-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
96 lines (82 loc) · 3.09 KB
/
build.gradle
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import org.gradle.internal.os.OperatingSystem
repositories {
jcenter()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
apply plugin: "java"
apply plugin: "idea"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
test {
useJUnitPlatform()
testLogging.info.events = ["FAILED", "SKIPPED", "PASSED", "STANDARD_OUT", "STANDARD_ERROR"]
}
sourceSets.main.java.srcDirs = ['src/main/java']
sourceSets.main.resources.srcDirs = ['src/main/resources']
sourceSets.test.java.srcDirs = ['src/test/java']
sourceSets.test.resources.srcDirs = ['src/test/resources']
project.ext.lwjglVersion = "3.2.3"
archivesBaseName = "adrift"
group = "ee.taltech.iti0200"
if (project.hasProperty("jarVersion")) {
project.version = project.jarVersion
} else {
project.version = "0.5"
}
println "Running version: $project.version"
if (project.hasProperty("lwjglNatives")) {
println "Using natives for lwjgl: $project.lwjglNatives"
} else {
switch (OperatingSystem.current()) {
case OperatingSystem.LINUX:
def osArch = System.getProperty("os.arch")
project.ext.lwjglNatives = (
osArch.startsWith("arm") || osArch.startsWith("aarch64")
? "natives-linux-${osArch.contains("64") || osArch.startsWith("armv8") ? "arm64" : "arm32"}"
: "natives-linux"
)
break
case OperatingSystem.WINDOWS:
project.ext.lwjglNatives = "natives-windows"
break
case OperatingSystem.MAC_OS:
project.ext.lwjglNatives = "natives-macos"
break
}
}
dependencies {
implementation "org.lwjgl:lwjgl-bom:$lwjglVersion"
implementation "org.lwjgl:lwjgl:$lwjglVersion"
implementation "org.lwjgl:lwjgl-glfw:$lwjglVersion"
implementation "org.lwjgl:lwjgl-opencl:$lwjglVersion"
implementation "org.lwjgl:lwjgl-opengl:$lwjglVersion"
implementation "org.apache.logging.log4j:log4j-api:2.13.0"
implementation "org.apache.logging.log4j:log4j-core:2.13.0"
implementation "javax.vecmath:vecmath:1.5.2"
implementation "org.joml:joml:1.9.22"
implementation "com.google.guava:guava:28.2-jre"
implementation "com.google.inject:guice:4.2.3"
implementation "com.google.inject.extensions:guice-assistedinject:4.2.3"
implementation "org.apache.commons:commons-lang3:3.10"
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
testImplementation "org.assertj:assertj-core:3.11.1"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.6.0"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.6.0"
testImplementation "org.mockito:mockito-inline:3.3.3"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.6.0"
}
jar {
manifest {
attributes "Main-Class": "ee.taltech.iti0200.application.Game"
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}