Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
72
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
59
Construisez votre bibliothèque Java/Kotlin
martinbonnin
2
93
Building libraries for the next 25 years
martinbonnin
2
75
Gratatouille: metaprogramming for your build-logic
martinbonnin
2
160
GraphQL 💙 Kotlin, 2024 edition
martinbonnin
1
72
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
Claude Codeを使った情報整理術
knishioka
10
5.9k
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
2
200
Bedrock AgentCore Memoryの新機能 (Episode) を試してみた / try Bedrock AgentCore Memory Episodic functionarity
hoshi7_n
2
1.9k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
11
390k
20251203_AIxIoTビジネス共創ラボ_第4回勉強会_BP山崎.pdf
iotcomjpadmin
0
140
New Relic 1 年生の振り返りと Cloud Cost Intelligence について #NRUG
play_inc
0
240
通勤手当申請チェックエージェント開発のリアル
whisaiyo
3
460
事業の財務責任に向き合うリクルートデータプラットフォームのFinOps
recruitengineers
PRO
2
210
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
180
子育てで想像してなかった「見えないダメージ」 / Unforeseen "hidden burdens" of raising children.
pauli
2
330
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
7
8.1k
特別捜査官等研修会
nomizone
0
570
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
210
Designing for Performance
lara
610
69k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
Odyssey Design
rkendrick25
PRO
0
440
Why Our Code Smells
bkeepers
PRO
340
57k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
How STYLIGHT went responsive
nonsquared
100
6k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
29
Six Lessons from altMBA
skipperchong
29
4.1k
Optimizing for Happiness
mojombo
379
70k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
580
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
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