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
GoとWasmでつくる軽量ブラウザUI
keyl0ve
0
130
Getting started with Google Antigravity
meteatamel
0
350
AWS CDK の目玉新機能「Mixins」とは / cdk-mixins
gotok365
2
250
primeNumber DATA MANAGEMENT CAMP #2:
masatoshi0205
1
380
技術キャッチアップ効率化を実現する記事推薦システムの構築
yudai00
2
140
「静的解析」だけで終わらせない。 SonarQube の最新機能 × AIで エンジニアの開発生産性を本気で上げる方法
xibuka
2
260
Interop Tokyo 2025 ShowNet Team Memberで学んだSRv6を基礎から丁寧に
miyukichi_ospf
0
170
競争優位を生み出す戦略的内製開発の実践技法
masuda220
PRO
2
400
生成AI素人でも玄人でもない私がセイセイAIチョットワカルために勉強したこと
wkm2
2
310
Agent Payments Protocolで実装するAIエージェント間取引
tokio007
0
160
フルスタックGoでスコア改ざんを防いだ話
ponyo877
0
520
AITuberKit+Bedrock AgentCoreで作る 3Dキャラクターエージェント
yokomachi
2
1.5k
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
370
GitHub's CSS Performance
jonrohan
1032
470k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
A Soul's Torment
seathinner
5
2.3k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
150
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Designing for Performance
lara
611
70k
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