2022-12-18 17:04:51 +00:00
|
|
|
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
|
|
|
|
|
|
|
|
def currentOS = DefaultNativePlatform.currentOperatingSystem;
|
2023-08-12 10:03:36 +00:00
|
|
|
def platform = null
|
2022-12-18 17:04:51 +00:00
|
|
|
if (currentOS.isWindows()) {
|
|
|
|
platform = 'win'
|
|
|
|
} else if (currentOS.isMacOsX()) {
|
|
|
|
platform = 'mac'
|
2024-08-03 07:56:34 +00:00
|
|
|
} else {
|
|
|
|
platform = 'linux'
|
2023-08-12 10:03:36 +00:00
|
|
|
}
|
|
|
|
|
2024-02-28 07:36:31 +00:00
|
|
|
if (System.getProperty ("os.arch") == 'aarch64') {
|
2023-08-12 10:03:36 +00:00
|
|
|
platform += '-aarch64'
|
2022-12-18 17:04:51 +00:00
|
|
|
}
|
|
|
|
|
2023-10-25 14:20:49 +00:00
|
|
|
configurations {
|
2024-02-28 07:36:31 +00:00
|
|
|
javafx
|
2023-10-25 14:20:49 +00:00
|
|
|
}
|
|
|
|
|
2024-05-07 04:35:18 +00:00
|
|
|
if (customJavaFxPath != null) {
|
|
|
|
repositories {
|
|
|
|
flatDir {
|
|
|
|
dirs customJavaFxPath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
2024-05-07 05:00:20 +00:00
|
|
|
javafx fileTree(dir: customJavaFxPath, include: '*.jar')
|
2024-05-07 04:35:18 +00:00
|
|
|
}
|
|
|
|
} 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-18 17:04:51 +00:00
|
|
|
}
|