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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
77
GraphQL_nullability__state_of_the_union.pdf
martinbonnin
1
35
Offline and Reactive apps with Apollo Kotlin
martinbonnin
1
64
What's new in Apollo Kotlin 3
martinbonnin
2
230
Other Decks in Technology
See All in Technology
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
tarappo
1
200
Kiro Powers 入門
k_adachi_01
0
120
(Test) ai-meetup slide creation
oikon48
3
460
AI実装による「レビューボトルネック」を解消する仕様駆動開発(SDD)/ ai-sdd-review-bottleneck
rakus_dev
0
160
Tebiki Engineering Team Deck
tebiki
0
27k
PMとしての意思決定とAI活用状況について
lycorptech_jp
PRO
0
140
Laravelで学ぶOAuthとOpenID Connectの基礎と実装
kyoshidaxx
0
110
OCI技術資料 : コンピュート・サービス 概要
ocise
4
54k
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
190
AlloyDB 奮闘記
hatappi
0
160
SRE NEXT 2026 CfP レビュアーが語る聞きたくなるプロポーザルとは?
yutakawasaki0911
1
450
品質を経営にどう語るか #jassttokyo / Communicating the Strategic Value of Quality to Executive Leadership
kyonmm
PRO
2
660
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
150
Agile that works and the tools we love
rasmusluckow
331
21k
The Spectacular Lies of Maps
axbom
PRO
1
630
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
We Have a Design System, Now What?
morganepeng
55
8k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Music & Morning Musume
bryan
47
7.1k
What's in a price? How to price your products and services
michaelherold
247
13k
30 Presentation Tips
portentint
PRO
1
260
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.9k
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