Skip to content

Instantly share code, notes, and snippets.

@IARI
Last active March 28, 2019 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IARI/3ffc341cc15b3eb6f974e195831935a2 to your computer and use it in GitHub Desktop.
Save IARI/3ffc341cc15b3eb6f974e195831935a2 to your computer and use it in GitHub Desktop.
Kotlin Gradle TornadoFX Boilerplate
val kotlinVersion = "1.3.21"
val mainClass = "com.example.demo.app.MyApp"
buildscript {
project.version = "0.1.0"
dependencies {
}
}
plugins {
id("org.jetbrains.kotlin.jvm") version "1.3.21"
id("kotlinx-serialization") version "1.3.21"
application
id("edu.sc.seis.launch4j") version "2.4.4"
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs = listOf(
"-Xuse-experimental=kotlin.Experimental",
"-Xuse-experimental=kotlinx.serialization.ImplicitReflectionSerializer"
)
}
application {
mainClassName = mainClass
}
sourceSets {
main {
//kotlin.srcDirs += 'src/main/kotlin'
//antlr.srcDirs += 'src/main/antlr'
resources {
srcDir("resources")
}
}
}
jar {
manifest {
attributes["Class-Path"] = configurations.compile.get().all.map { it.name }.joinToString(" ")
attributes["Main-Class"] = mainClass
}
}
launch4j {
mainClassName = mainClass
icon = "${projectDir}/resources/icons/logo.ico"
}
}
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://kotlin.bintray.com/kotlinx")
}
dependencies {
testCompile("junit:junit:4.12")
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
compile("org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.10.0")
compile("no.tornado:tornadofx:1.7.18")
compile("de.jensd:fontawesomefx-commons:8.15")
compile("de.jensd:fontawesomefx-emojione:2.2.7-2")
compile("de.jensd:fontawesomefx-fontawesome:4.7.0-5")
compile("de.jensd:fontawesomefx-icons525:3.0.0-4")
compile("de.jensd:fontawesomefx-materialdesignfont:1.7.22-4")
compile("de.jensd:fontawesomefx-materialicons:2.2.0-5")
compile("de.jensd:fontawesomefx-octicons:4.3.0-5")
compile("de.jensd:fontawesomefx-weathericons:2.0.10-5")
compile("de.jensd:fontawesomefx-controls:8.15")
}
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "kotlinx-serialization") {
//useModule("org.jetbrains.kotlinx:kotlinx-gradle-serialization-plugin:${requested.version}")
useModule("org.jetbrains.kotlin:kotlin-serialization:${requested.version}")
}
}
}
repositories {
gradlePluginPortal()
maven(url = "https://kotlin.bintray.com/kotlinx")
mavenLocal()
mavenCentral()
}
}
rootProject.name = "HelloWorld"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment