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
67
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
98
Harmonizing APIs, a comparison of GraphQL and OpenAPI through the Spotify API
martinbonnin
1
41
Construisez votre bibliothèque Java/Kotlin
martinbonnin
2
88
Building libraries for the next 25 years
martinbonnin
2
54
Gratatouille: metaprogramming for your build-logic
martinbonnin
2
140
GraphQL 💙 Kotlin, 2024 edition
martinbonnin
1
63
GraphQL_nullability__state_of_the_union.pdf
martinbonnin
1
33
Offline and Reactive apps with Apollo Kotlin
martinbonnin
1
55
What's new in Apollo Kotlin 3
martinbonnin
2
210
Other Decks in Technology
See All in Technology
robocopy の怖い話/scary-story-about-robocopy
emiki
0
440
AWS表彰プログラムとキャリアについて
naoki_0531
1
150
Strands Agents & Bedrock AgentCoreを1分でおさらい
minorun365
PRO
6
160
データエンジニアがクラシルでやりたいことの現在地
gappy50
3
810
みんなのSRE 〜チーム全員でのSRE活動にするための4つの取り組み〜
kakehashi
PRO
2
120
LIFF CLIとngrokを使ったLIFF/LINEミニアプリのお手軽実機確認
diggymo
0
180
Perlアプリケーションで トレースを実装するまでの 工夫と苦労話
masayoshi
1
370
私とAWSとの関わりの歩み~意志あるところに道は開けるかも?~
nagisa53
1
150
相互運用可能な学修歴クレデンシャルに向けた標準技術と国際動向
fujie
0
170
モバイルゲームの開発を支える基盤の歩み ~再現性のある開発ラインを量産する秘訣~
qualiarts
0
1.1k
AWS re:Inforce 2025 re:Cap Update Pickup & AWS Control Tower の運用における考慮ポイント
htan
1
160
興味の胞子を育て 業務と技術に広がる”きのこ力”
fumiyasac0921
0
540
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
A Modern Web Designer's Workflow
chriscoyier
695
190k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Building an army of robots
kneath
306
45k
Git: the NoSQL Database
bkeepers
PRO
431
65k
Facilitating Awesome Meetings
lara
54
6.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Faster Mobile Websites
deanohume
308
31k
Building Applications with DynamoDB
mza
95
6.5k
The Pragmatic Product Professional
lauravandoore
36
6.8k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
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