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
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
71
Construisez votre bibliothèque Java/Kotlin
martinbonnin
2
97
Building libraries for the next 25 years
martinbonnin
2
91
Gratatouille: metaprogramming for your build-logic
martinbonnin
2
170
GraphQL 💙 Kotlin, 2024 edition
martinbonnin
1
74
GraphQL_nullability__state_of_the_union.pdf
martinbonnin
1
35
Offline and Reactive apps with Apollo Kotlin
martinbonnin
1
63
What's new in Apollo Kotlin 3
martinbonnin
2
230
Other Decks in Technology
See All in Technology
「OSアップデート:年に一度の「大仕事」を乗り切るQA戦略」_Mobile Tech Flex 〜4社合同!私たちのモバイル開発自慢大会〜
gu3
0
220
欲しいを叶える個人開発の進め方 / How to Run an Indie Project That Brings Your Ideas to Life
endohizumi
0
330
opsmethod第1回_アラート調査の自動化にむけて
yamatook
0
280
Kubernetes環境周りの責任範囲をいい機会なので考える / Taking the Opportunity to Clarify Kubernetes Responsibilities
kohbis
1
110
バニラVisaギフトカードを棄てるのは結構大変
meow_noisy
0
130
Three-Legged OAuth in AgentCore Gateway
hironobuiga
2
190
意志を実装するアーキテクチャモダナイゼーション
nwiizo
3
1.7k
「静的解析」だけで終わらせない。 SonarQube の最新機能 × AIで エンジニアの開発生産性を本気で上げる方法
xibuka
2
260
サンタコンペ2025完全攻略 ~お前らの焼きなましは遅すぎる~
terryu16
1
290
『誰の責任?』で揉めるのをやめて、エラーバジェットで判断するようにした ~感情論をデータで終わらせる、PMとエンジニアの意思決定プロセス~
coconala_engineer
0
1.7k
大規模な組織におけるAI Agent活用の促進と課題
lycorptech_jp
PRO
4
4.9k
AI駆動開発とRAGプロダクトへの挑戦の軌跡 - 弁護士ドットコムでの学びから -
bengo4com
2
810
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
200
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
240
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
930
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
140
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
63
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
130
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Color Theory Basics | Prateek | Gurzu
gurzu
0
210
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
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