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
88
3
Share
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
More Decks by mbonnin
See All by mbonnin
Metadataquoi??
martinbonnin
0
130
Harmonizing APIs, a comparison of GraphQL and OpenAPI through the Spotify API
martinbonnin
1
84
Construisez votre bibliothèque Java/Kotlin
martinbonnin
2
110
Building libraries for the next 25 years
martinbonnin
2
110
Gratatouille: metaprogramming for your build-logic
martinbonnin
2
180
GraphQL 💙 Kotlin, 2024 edition
martinbonnin
1
94
GraphQL_nullability__state_of_the_union.pdf
martinbonnin
1
42
Offline and Reactive apps with Apollo Kotlin
martinbonnin
1
69
What's new in Apollo Kotlin 3
martinbonnin
2
240
Other Decks in Technology
See All in Technology
OpenID Connectによるサービス間連携
takesection
0
120
layerx-fde-practices
cipepser
6
2.8k
さきさん文庫の書籍ができるまで
sakiengineer
0
260
大規模環境でどのように監視を実現する?
yuobayashi
1
150
Java正規表現エンジン(NFA)の仕組みと パフォーマンスを維持するための最適化手法
takeuchi_132917
0
120
エンジニアは生成AIと どのように向き合うべきか? ことばの意味という観点から
verypluming
3
250
ポスター発表&デモと総括 / Poster Presentations & Demonstrations and Summary
ks91
PRO
0
140
Typiaで配信JSONの安全性を構造的に担保する(TSKaigi2026)
righttouch
PRO
1
180
自称宇宙最速で不合格となったAIP-C01にリベンジを果たすべくAIで問題集アプリを作ってみた。
yama3133
0
220
AI駆動開発でなんでもハンズオン環境をつくってみた
yoshimi0227
0
160
ビジュアルプログラミングIoTLT vol.23
1ftseabass
PRO
0
140
Python開発環境にハーネス適用を検討する
yuuka51
1
540
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
200
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
230
Designing for Performance
lara
611
70k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
220
The SEO identity crisis: Don't let AI make you average
varn
0
470
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
210
Practical Orchestrator
shlominoach
191
11k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.8k
Believing is Seeing
oripsolob
1
130
4 Signs Your Business is Dying
shpigford
187
22k
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