forked from stephengold/snap-jolt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
56 lines (45 loc) · 1.77 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Gradle script to build the snap-jolt project
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
plugins {
application // to build JVM applications
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<JavaCompile>().all { // Java compile-time options:
options.compilerArgs.add("-Xdiags:verbose")
options.compilerArgs.add("-Xlint:unchecked")
options.encoding = "UTF-8"
options.setDeprecation(true) // to provide detailed deprecation warnings
}
// Register tasks to run specific applications:
tasks.register<JavaExec>("HelloWorld") {
description = "Runs the HelloWorld app."
mainClass = "com.github.stephengold.snapjolt.HelloWorld"
}
val os = DefaultNativePlatform.getCurrentOperatingSystem()
tasks.withType<JavaExec>().all { // Java runtime options:
classpath = sourceSets.main.get().getRuntimeClasspath()
enableAssertions = true
if (os.isMacOsX()) {
jvmArgs("-XstartOnFirstThread") // required for GLFW on macOS
}
}
application {
mainClass = "com.github.stephengold.snapjolt.HelloWorld"
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, "seconds") // to disable caching of snapshots
}
val btf = "DebugSp"
dependencies {
implementation(libs.jolt.jni.linux64)
runtimeOnly(variantOf(libs.jolt.jni.linux64){ classifier(btf) })
runtimeOnly(variantOf(libs.jolt.jni.linuxarm32hf){ classifier(btf) })
runtimeOnly(variantOf(libs.jolt.jni.linuxarm64){ classifier(btf) })
runtimeOnly(variantOf(libs.jolt.jni.macosx64){ classifier(btf) })
runtimeOnly(variantOf(libs.jolt.jni.macosxarm64){ classifier(btf) })
runtimeOnly(variantOf(libs.jolt.jni.windows64){ classifier(btf) })
implementation(libs.jsnaploader)
}