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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ching Yi Chan
November 24, 2017
Education
670
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Learning How To Learn Gradle
Ching Yi Chan
November 24, 2017
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
190
twjug-lite-17 結束了幾個月的 Java Web 培訓 站在人蔘迷途的我
qrtt1
0
140
[twjug-lite] 迷你研發部 [1]
qrtt1
0
1.2k
寫個好懂的程式
qrtt1
1
670
OAuth 2.0 Authorization Code Flow
qrtt1
0
340
types of knowledge
qrtt1
1
1.4k
twjug 小活動
qrtt1
0
520
TWJUG 2019
qrtt1
0
250
Learning Concepts
qrtt1
0
290
Other Decks in Education
See All in Education
Visionary Initiative: Materials-Positive Society 「モノの進化をポジティブな社会の原動力に」|Science Tokyo(東京科学大学)
sciencetokyo
PRO
0
360
[2026前期火5] 論理学(京都大学文学部 前期 第3回)「形式言語と四つのキーワード:メタ・構成・意味論・ハーモニー」
yatabe
0
540
✅ レポート採点基準 / How Your Reports Are Assessed
yasslab
PRO
0
360
[2026前期火5] 論理学(京都大学文学部 前期 第1回)「ハルシネーションを外部世界との対応を考えずに見分ける方法」
yatabe
0
1.1k
Modern Data Fetching Techniques in Angular
debug_mode
0
210
コミュニティを通じた_キャリア設計のススメ_20260424.pdf
masakiokuda
0
320
プロポーザルを書く技術とアンチパターン/proposal-writing-and-antipatterns
moriyuya
13
3.4k
Why the humanities may be your best career bet
figarospeech
0
200
0415
cbtlibrary
0
210
Lectura 1 (PIT : Python Basico)
robintux
0
360
Virtual and Augmented Reality - Lecture 8 - Next Generation User Interfaces (4018166FNR)
signer
PRO
0
2.3k
吉祥寺.pmは1つじゃない — 複数イベント並走運営の12年 —
magnolia
0
1.3k
Featured
See All Featured
Making Projects Easy
brettharned
120
6.7k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
How to Talk to Developers About Accessibility
jct
2
230
Crafting Experiences
bethany
1
180
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
Building the Perfect Custom Keyboard
takai
2
790
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The SEO identity crisis: Don't let AI make you average
varn
0
490
Heart Work Chapter 1 - Part 1
lfama
PRO
7
36k
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䥥▀叞珯⧁䎛㓲⅀⃮䫆聼❇猳