Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Learning How To Learn Gradle
Search
Ching Yi Chan
November 24, 2017
Education
0
640
Learning How To Learn Gradle
Ching Yi Chan
November 24, 2017
Tweet
Share
More Decks by Ching Yi Chan
See All by Ching Yi Chan
[coscup] Reading and modifying the source code of the dbt adapter
qrtt1
0
170
twjug-lite-17 結束了幾個月的 Java Web 培訓 站在人蔘迷途的我
qrtt1
0
110
[twjug-lite] 迷你研發部 [1]
qrtt1
0
1.2k
寫個好懂的程式
qrtt1
1
650
OAuth 2.0 Authorization Code Flow
qrtt1
0
310
types of knowledge
qrtt1
1
1.4k
twjug 小活動
qrtt1
0
500
TWJUG 2019
qrtt1
0
230
Learning Concepts
qrtt1
0
260
Other Decks in Education
See All in Education
AIで日本はどう進化する? 〜キミが生きる2035年の地図〜
behomazn
0
120
卒論の書き方 / Happy Writing
kaityo256
PRO
54
28k
✅ レポート採点基準 / How Your Reports Are Assessed
yasslab
PRO
0
280
【dip】「なりたい自分」に近づくための、「自分と向き合う」小さな振り返り
dip_tech
PRO
0
230
外国籍エンジニアの挑戦・新卒半年後、気づきと成長の物語
hypebeans
0
730
Adobe Express
matleenalaakso
2
8.1k
MySmartSTEAM 2526
cbtlibrary
0
190
The Next Big Step Toward Nuclear Disarmament
hide2kano
0
220
Linguaxes de programación
irocho
0
530
SJRC 2526
cbtlibrary
0
200
JAPAN AI CUP Prediction Tutorial
upura
2
690
Semantic Web and Web 3.0 - Lecture 9 - Web Technologies (1019888BNR)
signer
PRO
2
3.2k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
22k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
The SEO identity crisis: Don't let AI make you average
varn
0
290
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Discover your Explorer Soul
emna__ayadi
2
1.1k
Navigating Weather and Climate Data
rabernat
0
110
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
53
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
76
Designing for humans not robots
tammielis
254
26k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Transcript
學習如何學習 Gradle qrtt1
我是誰 㡨倥䥥テ粕ㄌ 哛☸ㄌ亥⹙楃 ⡽禎 磐綔㊤䛧⹙
摸著良心問問 這是第幾次發願學好 Gradle
野外求生訓練, 北方在哪兒? 苮㤐⨉DWKNFUETKRV寂耦惐⢯獑 接下來的時間,我們將將補補 㱣㋖ 知識
我看了官網 User Guide
http://amzn.to/2AXaM0Z 我看了些書..., But http://bit.ly/2mZqyGe
真的上戰場時 ·如何指定 java 相容版本 ·怎麼新增 1 個 task 在某個 task
後 ·如何在 compile 後把檔案複製到 … ·如何替 apk 的檔名加上 revision
最後我只能 … ·上 stack overflow 找個相似的片段 ·貼回 build.gradle 看看合不合用 ·修修改改,看起來符和需求就好
對比一下 Java 學習 當我還是個 Java 新手時,我在 google 上找到可以用的片段。 貼回 IDE
上,修修改改,覺得能動了!就立馬 commit 交差。 你根本不懂自己在寫什麼!!! 被打槍 弄懂惹
對比一下 Gradle 學習 當我還是個 Gradle 新手時,我在 google 上找到可以用的片段。 貼回 build
script上,修修改改,覺得能動了!就立馬 commit 交差。 你根本不懂自己在寫什麼!!! 被打槍 弄懂惹 讓它去吧
現在,一起學看看... https://gradle.org/docs/ 使用官方文件 你也是一開始陣亡在這嗎? 現在有簡易版的呦! TIPS: following steps
先 冷靜一下 這一定有什麼問題,讓我一直學不會
磐綔㊤䛧⹙ 知識的類型 http://amzn.to/2izCr0W 事實 Factual 概念 Conceptual 程序 Procedural 後設認知
Metacognitive 嶓粕崎峩䥥㧙
知識的類型 概念 Conceptual 程序 Procedural 後設認知 Metacognitive 事實 Factual 它很早就存在了,可能沒有人知道它為何存在。
它的存在不需要特別的理由,甚至沒有什麼原因可以解釋。你只能記住它。 ·apply plugin: 'java' 引用 Java Plugin ·開發 Java 專案需引用 Java Plugin ·開發 Android 專案需引用 Android Plugin ·task copyDocs(type: Copy) 這麼寫建立得出 copy task
知識的類型 事實 Factual 程序 Procedural 後設認知 Metacognitive 概念 Conceptual 可以用來解釋、描述事實的知識。
task copyDocs(type: Copy) { from 'src/main/doc' into 'build/target/doc' } from 與 into 是來至 closure delegate 給 Copy type
知識的類型 事實 Factual 概念 Conceptual 後設認知 Metacognitive 程序 Procedural
使用知識的方法,結合現實的情境練習,用它來面對未遭遇過的問題。 task copyDocs(type: Copy) { from 'src/main/doc' into 'build/target/doc' } 1 2 3
知識的類型 事實 Factual 概念 Conceptual 程序 Procedural 後設認知 Metacognitive 自我調整
Self-regulation ⹙劳䫆帹 櫱䄍倱㩽 璶㹄䫆帹嬭䎛粕ㅰ 䠃䠀倱㩽 太棒惹 糟透惹 1 2 3 4
困境 若這些作為『事實、程序』知識 得花多久時間記憶它!? 事實 Factual 概念 Conceptual 程序 Procedural 後設認知
Metacognitive
如何學得快? • 正確地分類知識,需要⼤大量量『記憶』的部分⽤用⼩小抄取代 • 連結過去相似的經驗,產⽣生學習遷移 • 連結過去的背景知識,抵消⼤大量量新『事實』知識的數量量。 ⻇㕥ΩⅧ⼒峹∰Ⅷ苌峹⃮∰⼒⃮ㄙ䠉苌兝六䠺⨉⻰㕥⑈✈珯 嵒䥞⼒㤐哪⃡⚮⃪ 䫆帹䥥㓱桘聋ㆇ㽳㧪㏔瓞ℎ䥥㋌苌Ⰸ⯻⛋㤐幫㉃哨缨㋖䥥截幫
引用 新概念消減 ԫྼ過載 ⽤用我們比較熟悉的 來來看 Gradle ·Gradle 是 Groovy DSL
·Groovy 大致與 Java 一樣(除了部分的 syntax sugar) ·Groovy DSL 都有一個負責喬事情的物件 $CUKE5ETKRV
API Javadoc 與 DSL Reference 㧪嵇圸䠉職⢯獑 http://www.codedata.com.tw/java/understanding-gradle-4-gradle-script/ 補充資料:【認識 Gradle】(4)看懂 Gradle
Script
喬事⼈人 BasicScript https://github.com/gradle/gradle/blob/v4.1.0-milestone-1/subprojects/core/src/main/java/org/gradle/groovy/scripts/BasicScript.java 㔡㧪䥥▶∽揞耼職MetaObjectProtocol❝⛌target 䡗≁⻮⃡⋬䕊⇗❝⛌OGVJQF㓷CEEGUUHKGNF磢苌 䡗完≠䠉⻮羖⃮⸹⨉䥥㧠⇄⫘嬭惐㉲ TIPS: println scriptTarget
今天只要 學會查 Javadoc 就成功一半了! 說人話!!!! 請把 BuildScript 當作 Project 物件
所有的 method call / property access 都先當是對 Project 物件來做事。 https://docs.gradle.org/4.3.1/dsl/org.gradle.api.Project.html TIPS: find Project core-type in the document
如果操作的對象不是 Project 該怎麼辦? 罜帹⃬⃡㊦缙䥥)TQQX[嵿㾶 ⠰⃬⃡delegate㤐嶑 https://docs.gradle.org/4.3.1/dsl/org.gradle.api.tasks.Copy.html TIPS: println delegate
野外求⽣生技能摘要 • 認識 MetaObjectProtocol 後,知道 Project 通常是直接作 ⽤用對象 • 認識
Closure 特性後,練習透過 delegate 找出負責的物 件,就查到教學⽂文件沒跟你介紹過的 method 㱣㋖ Ⅼ⻇ 㱣㋖ Ⅼ⻇
對比一下 Gradle 學習 當我還是個 Gradle 新手時,我在 google 上找到可以用的片段。 貼回 build
script上,修修改改,覺得能動了!就立馬 commit 交差。 你根本不懂自己在寫什麼!!! 㱣㋖ Ⅼ⻇ 粕ㅰ 哋㓲璶㹄
• 《由 Groovy 到 Gradle》 https://github.com/qrtt1/JCConf2015_from_groovy_to_gradle • Gradle RuleSource Plugin
筆記 https://github.com/qrtt1/Notes/blob/master/20170312_gradle.rule.source.plugin.md • MultipleFlavor 實作思路路 https://github.com/qrtt1/Notes/blob/master/20170312_android.multi.flavors.md 後續學習建議 㱣㋖ 㱣㋖ Ⅼ⻇ 㱣㋖ 粕ㅰ
你沒有學會 Gradle,但學會了νОኪ୦ Gradle Q & A ⃮⛐⇆⠰Ⰻ臶䥥苌㧤⃮㧤⌻111䥥▀叞珯⧁䎛㓲⅀⃮䫆聼❇猳