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
71
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
110
Harmonizing APIs, a comparison of GraphQL and OpenAPI through the Spotify API
martinbonnin
1
51
Construisez votre bibliothèque Java/Kotlin
martinbonnin
2
90
Building libraries for the next 25 years
martinbonnin
2
63
Gratatouille: metaprogramming for your build-logic
martinbonnin
2
150
GraphQL 💙 Kotlin, 2024 edition
martinbonnin
1
70
GraphQL_nullability__state_of_the_union.pdf
martinbonnin
1
34
Offline and Reactive apps with Apollo Kotlin
martinbonnin
1
62
What's new in Apollo Kotlin 3
martinbonnin
2
220
Other Decks in Technology
See All in Technology
Kubernetesと共にふりかえる! エンタープライズシステムのインフラ設計・テストの進め方大全
daitak
0
340
Amazon ECS デプロイツール ecspresso の開発を支える「正しい抽象化」の探求 / YAPC::Fukuoka 2025
fujiwara3
13
3.8k
Proxmox × HCP Terraformで始めるお家プライベートクラウド
lamaglama39
1
210
マイクロリブート ~ACEマインドセットで実現するアジャイル~
sony
1
400
Redux → Recoil → Zustand → useSyncExternalStore: 状態管理の10年とReact本来の姿
zozotech
PRO
18
8.6k
仕様は“書く”より“語る” - 分断を超えたチーム開発の実践 / 20251115 Naoki Takahashi
shift_evolve
PRO
1
1k
単一Kubernetesクラスタで実現する AI/ML 向けクラウドサービス
pfn
PRO
1
140
身近なCSVを活用する!AWSのデータ分析基盤アーキテクチャ
koosun
0
1.7k
Quarkusで作るInteractive Stream Application
joker1007
0
150
ステートレスなLLMでステートフルなAI agentを作る - YAPC::Fukuoka 2025
gfx
8
1.3k
ある編集者のこれまでとこれから —— 開発者コミュニティと歩んだ四半世紀
inao
5
3.3k
ZOZOTOWNカート決済リプレイス ── モジュラモノリスという過渡期戦略
zozotech
PRO
0
430
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Statistics for Hackers
jakevdp
799
220k
Writing Fast Ruby
sferik
630
62k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
A better future with KSS
kneath
239
18k
Faster Mobile Websites
deanohume
310
31k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
980
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
GraphQLとの向き合い方2022年版
quramy
49
14k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
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