2022-12-19 06:04:51 +13:00
|
|
|
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
|
|
|
|
|
|
|
|
def currentOS = DefaultNativePlatform.currentOperatingSystem;
|
2023-08-12 22:03:36 +12:00
|
|
|
def platform = null
|
2022-12-19 06:04:51 +13:00
|
|
|
if (currentOS.isWindows()) {
|
|
|
|
platform = 'win'
|
|
|
|
} else if (currentOS.isLinux()) {
|
|
|
|
platform = 'linux'
|
|
|
|
} else if (currentOS.isMacOsX()) {
|
|
|
|
platform = 'mac'
|
2023-08-12 22:03:36 +12:00
|
|
|
}
|
|
|
|
|
2024-02-28 20:36:31 +13:00
|
|
|
if (System.getProperty ("os.arch") == 'aarch64') {
|
2023-08-12 22:03:36 +12:00
|
|
|
platform += '-aarch64'
|
2022-12-19 06:04:51 +13:00
|
|
|
}
|
|
|
|
|
2023-10-26 03:20:49 +13:00
|
|
|
configurations {
|
2024-02-28 20:36:31 +13:00
|
|
|
javafx
|
2023-10-26 03:20:49 +13:00
|
|
|
}
|
|
|
|
|
2024-05-07 16:35:18 +12:00
|
|
|
if (customJavaFxPath != null) {
|
|
|
|
repositories {
|
|
|
|
flatDir {
|
|
|
|
dirs customJavaFxPath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
javafx name: "org.openjfx:javafx-base"
|
|
|
|
javafx name: "org.openjfx:javafx-controls"
|
|
|
|
javafx name: "org.openjfx:javafx-graphics"
|
|
|
|
javafx name: "org.openjfx:javafx-media"
|
|
|
|
javafx name: "org.openjfx:javafx-web"
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// Always use maven version for now
|
|
|
|
dependencies {
|
|
|
|
javafx "org.openjfx:javafx-base:${javafxVersion}:${platform}"
|
|
|
|
javafx "org.openjfx:javafx-controls:${javafxVersion}:${platform}"
|
|
|
|
javafx "org.openjfx:javafx-graphics:${javafxVersion}:${platform}"
|
|
|
|
javafx "org.openjfx:javafx-media:${javafxVersion}:${platform}"
|
|
|
|
javafx "org.openjfx:javafx-web:${javafxVersion}:${platform}"
|
|
|
|
}
|
2022-12-19 06:04:51 +13:00
|
|
|
}
|