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
110
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
70
Deep, Skinny Neural Networks are not Universal Approximators
breandan
0
69
PRM-RL: Long-range Robotic Navigation Tasks by Combining Reinforcement Learning and Sampling-based Planning
breandan
0
74
DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Cars
breandan
0
71
Idiolect: A Reconfigurable Voice Coding Assisant
breandan
0
83
Interactive Programming with Automated Reasoning
breandan
0
53
Learning Structural Edits via Incremental Tree Transformations
breandan
0
22
Thinking Like Transformers
breandan
0
52
Discriminative Embeddings of Latent Variable Models for Structured Data
breandan
0
20
Other Decks in Programming
See All in Programming
Microservices rules (July 2024) : what good looks like
cer
PRO
0
1.6k
Jetpack for KMP
fornewid
1
290
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
CSC307 Lecture 12
javiergs
PRO
0
220
CSC307 Lecture 07
javiergs
PRO
0
220
Product Management LT会_クアンド新家
shinshin
0
210
AHC035解説
terryu16
0
710
Composing an API the *right* way (Droidcon Berlin 2024)
zsmb
1
450
【Go言語】golangci-lintの使い方
tomo1227
0
270
最古の関数型言語「Lisp」ことはじめ / lisp_in_kamiyama
uhooi
1
190
ドメイン駆動設計の実践
masuda220
PRO
17
5.1k
Async Await: Mastering Python's Time-Bending Tricks - EuroPython2024
yanbo
1
290
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
399
65k
5 minutes of I Can Smell Your CMS
philhawksworth
200
19k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
The Cult of Friendly URLs
andyhume
75
5.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
17
8.7k
Done Done
chrislema
179
15k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
24
1.8k
The Invisible Side of Design
smashingmag
294
50k
Optimizing for Happiness
mojombo
373
69k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
277
13k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Building Your Own Lightsaber
phodgson
101
5.9k
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")) } }