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
Paris Kotlin Meetup de mai: Gradle 💙 Kotlin
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
mbonnin
May 11, 2023
Technology
3
74
Paris Kotlin Meetup de mai: Gradle 💙 Kotlin
Tout ce que vous voulez savoir (ou pas) sur le Gradle Kotlin DSL (ou build scripts!)
mbonnin
May 11, 2023
Tweet
Share
More Decks by mbonnin
See All by mbonnin
Metadataquoi??
martinbonnin
0
120
Harmonizing APIs, a comparison of GraphQL and OpenAPI through the Spotify API
martinbonnin
1
74
Construisez votre bibliothèque Java/Kotlin
martinbonnin
2
99
Building libraries for the next 25 years
martinbonnin
2
96
Gratatouille: metaprogramming for your build-logic
martinbonnin
2
170
GraphQL 💙 Kotlin, 2024 edition
martinbonnin
1
78
GraphQL_nullability__state_of_the_union.pdf
martinbonnin
1
36
Offline and Reactive apps with Apollo Kotlin
martinbonnin
1
65
What's new in Apollo Kotlin 3
martinbonnin
2
230
Other Decks in Technology
See All in Technology
LINEヤフーにおけるAIOpsの現在地
lycorptech_jp
PRO
5
2.1k
The Rise of Browser Automation: AI-Powered Web Interaction in 2026
marcthompson_seo
0
300
イベントで大活躍する電子ペーパー名札を作る(その2) 〜 M5PaperとM5PaperS3 〜 / IoTLT @ JLCPCB オープンハードカンファレンス
you
PRO
0
190
今日から始められるテスト自動化 〜 基礎知識から生成AI活用まで 〜
magicpod
1
120
データマネジメント戦略Night - 4社のリアルを語る会
kubell_hr
0
170
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
qa
0
160
Visional 28新卒プロダクト職(エンジニア/デザイナー)向け 会社説明資料 / Visional Company Briefing for Newgrads 28
visional_engineering_and_design
1
130
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
20
10k
DMBOKを使ってレバレジーズのデータマネジメントを評価した
leveragestech
0
180
Phase01_AI座学_基礎
overflowinc
0
3.4k
SLI/SLO 導入で 避けるべきこと3選
yagikota
0
140
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
3
470
Prompt Engineering for Job Search
mfonobong
0
220
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
150
A Modern Web Designer's Workflow
chriscoyier
698
190k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
68
38k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Automating Front-end Workflow
addyosmani
1370
200k
Transcript
Bienvenue 🤗
Kotlin DSL Tout ce que vous avez toujours voulu savoir
sur le Gradle Kotlin DSL sans jamais le oser le demander.
@MartinBonnin apollographql/apollo-kotlin
Gradle
Google
Jetbrains
Changes • gradle init • Android Studio/IntelliJ templates • API
docs • Documentation!
plugins { id 'org.jetbrains.kotlin.jvm' version '1.5.31' } dependencies { implementation(’com.squareup.okio:okio:3.0.0’)
} kotlin { explicitApi() } tasks { compileKotlin { kotlinOptions { apiVersion = '1.3' } } }
plugins { id("org.jetbrains.kotlin.jvm").version("1.5.31") } dependencies { implementation("com.squareup.okio:okio:3.0.0") } kotlin {
explicitApi() } tasks { compileKotlin { kotlinOptions { apiVersion = "1.3" } } }
It’s good?
It’s (mostly) good! • Autocomplete • Only one language
None
Kotlin DSL (Gradle Kotlin) != Kotlin build scripts (Jetbrains Kotlin)
Kotlin DSL = Kotlin build scripts + generated accessors +
sam-with-receiver + assignment operator + gradleKotlinDSL() + apiVersion + -Xsam-conversions=class
Demo
Wrap up
None
None
None
https://github.com/gradle/gradle/issues/15886#issuecomment-954833377
Pour aller plus loin https://www.youtube.com/watch?v=oavqsLKRuDU
Merci! @MartinBonnin
Resources • https://android-developers.googleblog.com/2023/04/kotlin-dsl-is-now-default-for-new-gradle-builds.html • https://blog.gradle.org/kotlin-dsl-is-now-the-default-for-new-gradle-builds • https://blog.jetbrains.com/kotlin/2023/04/kotlin-dsl-is-the-default-for-new-gradle-builds/ • https://docs.gradle.org/current/userguide/kotlin_dsl.html •
https://github.com/gradle/gradle/pull/24286 • https://gradle.github.io/kotlin-dsl-docs/api/ • https://storage.googleapis.com/martin-public/userguide/writing_in_kotlin.html • https://github.com/gradle/gradle/blob/master/subprojects/kotlin-dsl-provider-plugins/src/main/kotlin/org/gradle/k otlin/dsl/provider/plugins/DefaultProjectSchemaProvider.kt • https://www.youtube.com/watch?v=oavqsLKRuDU