-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
81 lines (67 loc) · 2.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
plugins {
id 'java'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.0.0'
}
sourceCompatibility = '1.11'
targetCompatibility = '1.11'
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
group 'gruppe-8'
version 'buddlerjoe-1.0'
jar {
manifest {
attributes(
'Main-Class': 'Main'
)
}
}
//Task for milestone 3
tasks.register("build-cs108") {
group = 'build'
doLast {
println 'Running cs108 build task to generate a standalone jar and javadoc.'
}
}
tasks.getByName("build-cs108").finalizedBy shadowJar
tasks.getByName("build-cs108").finalizedBy javadoc
//import org.gradle.internal.os.OperatingSystem
checkstyle {
toolVersion = '8.5'
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.9'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.0.9'
testCompile 'junit:junit:4.12'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.27.0'
implementation "org.lwjgl:lwjgl:3.2.1"
implementation "org.lwjgl:lwjgl-glfw:3.2.1"
implementation "org.lwjgl:lwjgl-openal:3.2.1"
implementation "org.lwjgl:lwjgl-opengl:3.2.1"
implementation "org.lwjgl:lwjgl-stb:3.2.1"
implementation "org.joml:joml:1.9.13"
//Add all the windows and linux natives so we have 1 jar.
for (int i = 0; i <= 1; i++) {
switch (i) {
case 0:
project.ext.lwjglNatives = "natives-linux"
break
case 1:
project.ext.lwjglNatives = "natives-windows"
break
case 2:
project.ext.lwjglNatives = "natives-macos"
break
}
runtimeOnly "org.lwjgl:lwjgl:3.2.1:$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-glfw:3.2.1:$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-openal:3.2.1:$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-opengl:3.2.1:$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-stb:3.2.1:$lwjglNatives"
}
}