import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform plugins { id 'application' } group 'ch.tpolgrabia.javashowcase' version '1.0-SNAPSHOT' def currentOS = DefaultNativePlatform.currentOperatingSystem; def platform if (currentOS.isWindows()) { platform = 'win' } else if (currentOS.isLinux()) { platform = 'linux' } else if (currentOS.isMacOsX()) { platform = 'mac' } java { modularity.inferModulePath = true } repositories { mavenCentral() } dependencies { implementation "org.openjfx:javafx-base:15.0.1:${platform}" implementation "org.openjfx:javafx-controls:15.0.1:${platform}" implementation "org.openjfx:javafx-graphics:15.0.1:${platform}" implementation "org.openjfx:javafx-fxml:15.0.1:${platform}" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' } test { useJUnitPlatform() } application { mainModule = 'ch.tpolgrabia.javashowcase.javafx1demo' mainClass = 'ch.tpolgrabia.javashowcase.javafxdemo.JavaFxApplication' }