Skip to content

Instantly share code, notes, and snippets.

@deggers
Created April 24, 2020 15:24
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 deggers/804cb1ffe6853d968ab58683e0f3318f to your computer and use it in GitHub Desktop.
Save deggers/804cb1ffe6853d968ab58683e0f3318f to your computer and use it in GitHub Desktop.
gradlw run does not work with javafx
plugins {
kotlin("jvm") version "1.3.61"
id("application")
id("org.openjfx.javafxplugin") version "0.0.8"
}
javafx {
// Declare the javafx modules we need to use
version = "13.0.2"
modules("javafx.controls", "javafx.base")
}
application {
mainClassName = "de.deggers.application.ApplicationRunner"
}
group = "org.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven { setUrl("https://oss.sonatype.org/content/repositories/snapshots") }
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("no.tornado:tornadofx:2.0.0-SNAPSHOT")
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
}
val jar by tasks.getting(Jar::class) {
manifest {
attributes["Main-Class"] = "de.deggers.application.ApplicationRunner"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment