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
Building Developer Tools with Kotlin
Search
Breandan Considine
April 19, 2017
Programming
0
120
Building Developer Tools with Kotlin
Breandan Considine
April 19, 2017
Tweet
Share
More Decks by Breandan Considine
See All by Breandan Considine
Intrinsic social motivation via causal influence in multi-agent RL
breandan
0
79
Deep, Skinny Neural Networks are not Universal Approximators
breandan
0
74
PRM-RL: Long-range Robotic Navigation Tasks by Combining Reinforcement Learning and Sampling-based Planning
breandan
0
98
DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Cars
breandan
0
77
Idiolect: A Reconfigurable Voice Coding Assisant
breandan
0
100
Interactive Programming with Automated Reasoning
breandan
0
55
Learning Structural Edits via Incremental Tree Transformations
breandan
0
26
Thinking Like Transformers
breandan
0
62
Discriminative Embeddings of Latent Variable Models for Structured Data
breandan
0
23
Other Decks in Programming
See All in Programming
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
100
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
ヤプリ新卒SREの オンボーディング
masaki12
0
130
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
距離関数を極める! / SESSIONS 2024
gam0022
0
280
Ethereum_.pdf
nekomatu
0
460
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
40
2.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Scaling GitHub
holman
458
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
89
A Philosophy of Restraint
colly
203
16k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Gamification - CAS2011
davidbonilla
80
5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Embracing the Ebb and Flow
colly
84
4.5k
Transcript
Building Developer Tools with Kotlin and Gradle Breandan Considine GIDS
2017
Why develop tools? • Syntax manipulation • Typing completions •
Static code analysis • UI/UX components • Language support • Framework support
Why use Kotlin? • IntelliJ Platform / Eclipse integration •
Java language / JVM interoperability • Functional programming patterns • Simplifies framework interactions • Domain specific languages • Build tools integration
Why use Gradle? • Comprehensive tooling support • Cross-platform IDE
• Gradle tooling API • Language-native buildscripts • Vibrant plugin ecosystem • Gradlew is awesome!
public class Singleton { private Singleton() {} private static instance;
public static Singleton getInstance() { if(instance == null) instance = new Singleton(); return instance; } public void doSomething() {} } 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: Singleton pattern: Java
Singleton.doSomething() Singleton pattern: Java Singleton.getInstance().doSomething();
Singleton.doSomething() object Singleton { fun doSomething() {} } Singleton pattern:
Kotlin 1: 2: 3: Lazy Initialization
public class Singleton { private Singleton() {} private static instance;
public static Singleton getInstance() { if(instance == null) instance = new Singleton(); return instance; } public void doSomething() {} } 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: Singleton pattern: Java
IntelliJ Platform SDK ActionManager.getInstance() .getAction("MyAction")… MyAction…
Kotlin Extensions fun String.print(string: String) { println(string) } "hello".print()
IntelliJ Platform Kotlin DSL 1: val panel = panel {
2: noteRow("Login:") 3: row("Username:") { userField() } 4: row("Password:") { passwordField() } 5: row { 6: rememberCheckBox() 7: right { 8: link("Forgot?") { browse(forgot) } 9: } 10: } 11: noteRow("No account? $signupLink") 12: }
Gradle Script Kotlin (GSK) buildscript { repositories { gradleScriptKotlin() }
dependencies { classpath(kotlinModule("gradle-plugin")) } }