-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
126 lines (106 loc) · 3.02 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
115
116
117
118
119
120
121
122
123
124
125
126
allprojects {
apply plugin: "java"
apply plugin: "idea"
sourceCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
version = '2.2.3'
ext {
appName = "miniventure"
gdxVersion = '1.9.8'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.3'
aiVersion = '1.8.0'
unirestVersion = '1.4.9'
kryonetVersion = '2.22.0-RC1'
visuiVersion = '1.4.0'
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
subprojects {
sourceSets.main.java.srcDirs = [ "src/" ]
/*sourceSets.main.java.excludes = [
"miniventure/game/world/worldgen/noise/Testing",
"miniventure/game/world/worldgen/WorldGenTest"
]
sourceSets.test.java.srcDirs = [ "../core/$project.name/src/" ]
*/
dependencies {
compile "org.jetbrains:annotations:15.0"
}
}
sourceSets.main.java.srcDirs = []
dependencies {
compile project(":launcher")
}
project(":launcher") {
dependencies {
compile project(":client")
compile project(":server")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
}
}
project(":common") {
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
//compile "com.badlogicgames.box2dlights:box2dlights:$box2DLightsVersion"
//compile "com.badlogicgames.ashley:ashley:$ashleyVersion"
compile "net.openhft:zero-allocation-hashing:0.8"
compile "com.esotericsoftware:kryonet:$kryonetVersion"
compile "com.mashape.unirest:unirest-java:$unirestVersion"
}
}
project("client") {
dependencies {
compile project(":common")
compile "com.kotcrab.vis:vis-ui:$visuiVersion"
}
}
project(":server") {
dependencies {
compile project(":common")
}
}
ext {
mainClassName = "miniventure.game.core.Launcher"
assetsDir = new File("core/common/assets")
}
// build dist jar
task dist(dependsOn: classes, type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(assetsDir)
manifest {
attributes 'Main-Class': mainClassName
}
}
// default "run" task
task run(dependsOn: classes, type: JavaExec) {
main = mainClassName
classpath = sourceSets.main.runtimeClasspath
//standardInput = System.in
workingDir = assetsDir
ignoreExitValue = true
}
// test builds
task worldgentest(dependsOn: classes, type: JavaExec) {
main = "miniventure.game.world.worldgen.WorldGenTest"
classpath = sourceSets.main.runtimeClasspath
//standardInput = System.in
workingDir = assetsDir
}
task noisegentest(dependsOn: classes, type: JavaExec) {
main = "miniventure.game.world.worldgen.noise.Testing"
classpath = sourceSets.main.runtimeClasspath
//standardInput = System.in
workingDir = assetsDir
}