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
mbonnin
May 11, 2023
Technology
3
63
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
75
Harmonizing APIs, a comparison of GraphQL and OpenAPI through the Spotify API
martinbonnin
1
32
Construisez votre bibliothèque Java/Kotlin
martinbonnin
2
86
Building libraries for the next 25 years
martinbonnin
2
47
Gratatouille: metaprogramming for your build-logic
martinbonnin
2
130
GraphQL 💙 Kotlin, 2024 edition
martinbonnin
1
57
GraphQL_nullability__state_of_the_union.pdf
martinbonnin
1
30
Offline and Reactive apps with Apollo Kotlin
martinbonnin
1
52
What's new in Apollo Kotlin 3
martinbonnin
2
190
Other Decks in Technology
See All in Technology
生成AIのユースケースをとにかく集めてまるっと学ぶ!/ all about generative ai usecases
gakumura
3
320
SREからゼロイチプロダクト開発へ ー越境する打席の立ち方と期待への応え方ー / Product Engineering Night #8
itkq
2
1.1k
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
140
AWS全冠芸人が見た世界 ~資格取得より大切なこと~
masakiokuda
6
6.5k
AIとSREで「今」できること
honmarkhunt
3
610
営業向け誰でも話せるOCIセールストーク
oracle4engineer
PRO
2
130
Building App Extensions equivalents on Android (maybe?)
atsushieno
1
130
GraphQLを活用したリアーキテクチャに対応するSLI/Oの再設計
coconala_engineer
0
140
CodeRabbitと過ごした1ヶ月 ─ AIコードレビュー導入で実感したチーム開発の進化
mitohato14
0
170
ドキュメント管理の理想と現実
kazuhe
1
280
日経電子版 for Android の技術的課題と取り組み(令和最新版)/android-20250423
nikkei_engineer_recruiting
1
580
2025-04-24 "Manga AI Understanding & Localization" Furukawa Arata (CyberAgent, Inc)
ornew
2
300
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
580
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
Scaling GitHub
holman
459
140k
It's Worth the Effort
3n
184
28k
Designing for humans not robots
tammielis
253
25k
The Cult of Friendly URLs
andyhume
78
6.3k
Unsuck your backbone
ammeep
670
57k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.3k
Raft: Consensus for Rubyists
vanstee
137
6.9k
Bash Introduction
62gerente
611
210k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
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