-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
114 lines (95 loc) · 4.01 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
plugins {
id 'java'
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.7.10'
}
version = '4.3.0-SNAPSHOT'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
compileJava.sourceCompatibility = '17'
compileJava.targetCompatibility = '17'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
compileTestJava.options.compilerArgs += ['-Xlint']
compileKotlin.kotlinOptions.jvmTarget = '1.8'
compileTestKotlin.kotlinOptions.jvmTarget = '1.8'
def startOnFirstThread = System.getenv('START_ON_FIRST_THREAD')
if (Boolean.parseBoolean(startOnFirstThread) ||
startOnFirstThread == null && OperatingSystem.current() == OperatingSystem.MAC_OS) {
applicationDefaultJvmArgs += "-XstartOnFirstThread"
}
//applicationDefaultJvmArgs += ["-Xmx128M"]
//applicationDefaultJvmArgs += ["-Dlog4j.debug"]
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://raw.github.com/SpinyOwl/repo/releases" }
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation project('OrchEngine')
implementation 'com.spinyowl:legui:4.1.0'
implementation 'io.cucumber:cucumber-picocontainer:7.11.1'
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.2'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2'
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok:1.18.26'
testCompileOnly 'org.projectlombok:lombok:1.18.26'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.26'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.2'
}
application {
mainClassName = 'cc.abro.tow.GameStart'
}
distributions.main.contents {
into ('maps') { from 'maps' }
}
test {
useJUnitPlatform()
}
startScripts.doLast {
windowsScript.text = windowsScript.text.replaceAll('set CLASSPATH=.*', 'set CLASSPATH=.;%APP_HOME%/lib/*')
}
//LWJGL-3.3.1, Minimal OpenGL, All x64 OS (include arm)
import org.gradle.internal.os.OperatingSystem
project.ext.lwjglVersion = "3.3.1"
def buildLwjglNatives = System.getenv('BUILD_LWJGL_NATIVES')
if (buildLwjglNatives != null) {
project.ext.lwjglNatives = buildLwjglNatives
} 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.MAC_OS:
project.ext.lwjglNatives = System.getProperty("os.arch").startsWith("aarch64") ? "natives-macos-arm64" : "natives-macos"
break
case OperatingSystem.WINDOWS:
def osArch = System.getProperty("os.arch")
project.ext.lwjglNatives = osArch.contains("64")
? "natives-windows${osArch.startsWith("aarch64") ? "-arm64" : ""}"
: "natives-windows-x86"
break
}
}
dependencies {
implementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
implementation "org.lwjgl:lwjgl"
implementation "org.lwjgl:lwjgl-assimp"
implementation "org.lwjgl:lwjgl-glfw"
implementation "org.lwjgl:lwjgl-openal"
implementation "org.lwjgl:lwjgl-opengl"
implementation "org.lwjgl:lwjgl-stb"
runtimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-assimp::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-glfw::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-openal::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-opengl::$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
implementation 'org.jetbrains:annotations:23.0.0'
}