-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (64 loc) · 1.71 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
import org.apache.tools.ant.taskdefs.condition.Os
plugins {
id 'java'
id 'application'
id 'com.stehno.natives' version '0.2.4'
}
ext {
javaLanguageLevel = '1.8'
lwjglVersion = "2.9.3"
libraries = [
lwjgl: "org.lwjgl.lwjgl:lwjgl:$lwjglVersion"
]
}
version = '0.1.0'
sourceSets.main.java.srcDirs = ['src']
mainClassName = 'ui.ACFRenderer'
repositories {
jcenter()
mavenCentral()
}
dependencies {
compile 'com.google.code.gson:gson:2.8.6'
compile 'ca.weblite:java-objc-bridge:1.0.0'
compile 'net.dean.jraw:JRAW:1.1.0'
compile 'com.github.davidmoten:word-wrap:0.1.6'
compile 'org.slick2d:slick2d-core:1.0.1'
compile "org.lwjgl.lwjgl:lwjgl:$lwjglVersion"
}
natives {
lwjglVersion = "2.9.3"
def os = getOS()
println "Unpacking natives for $os to ./build/natives/$os"
jars = [
"lwjgl-platform-$lwjglVersion-natives-osx",
"lwjgl-platform-$lwjglVersion-natives-windows",
"lwjgl-platform-$lwjglVersion-natives-linux" ]
platforms = "$os"
}
run {
dependsOn 'unpackNatives'
systemProperty 'java.library.path', file("build/natives/${getOS()}")
}
test {
maxHeapSize = "1024m"
jvmArgs '-XX:MaxPermSize=256m'
systemProperty 'java.library.path', file("build/natives/${getOS()}")
}
def getOS() {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
return 'win'
}
if (Os.isFamily(Os.FAMILY_MAC)) {
return 'osx'
}
if (Os.isFamily(Os.FAMILY_UNIX))
return 'linux' //this is not really all that correct
throw new GradleException('Your OS does not seem to be supported')
}
task checkOS {
println "Operating System: ${getOS()}"
}
task wrapper(type: Wrapper) {
gradleVersion = '2.7'
}