Created
June 5, 2018 03:45
-
-
Save gildor/0e33c8d8a3bf647c41d9a12fdefb8169 to your computer and use it in GitHub Desktop.
Minimal TornadoFX setup with Gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//File build.gradle | |
plugins { | |
id "org.jetbrains.kotlin.jvm" version "1.2.41" | |
id "application" | |
} | |
mainClassName = "HelloWorldKt" | |
repositories { | |
jcenter() | |
} | |
compileKotlin { | |
kotlinOptions.jvmTarget= "1.8" | |
} | |
dependencies { | |
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8" | |
compile 'no.tornado:tornadofx:1.7.16' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//File src/main/kotlin/HelloWorld.kt | |
import tornadofx.* | |
class HelloWorld : View() { | |
override val root = hbox { | |
label("Hello world") | |
} | |
} | |
class MyApp : App(HelloWorld::class) | |
fun main(args: Array<String>) { | |
launch<MyApp>(args) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment