-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
146 lines (121 loc) · 4.81 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
def javaVersion = JavaVersion.VERSION_1_7;
// solution from here: http://stackoverflow.com/questions/28065488/how-to-enforce-a-java-compiler-version-with-gradle
task enforceVersion << {
def foundVersion = JavaVersion.current();
// if (foundVersion != javaVersion)
// throw new IllegalStateException("Wrong Java version; required is "
// + javaVersion + ", but found " + foundVersion);
}
buildscript {
repositories {
mavenCentral()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath "me.champeau.gradle:jmh-gradle-plugin:0.2.0"
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "me.champeau.gradle.jmh"
version = '1.0'
ext {
appName = "atc-simulator"
gdxVersion = '1.9.4'
roboVMVersion = '1.12.0'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0'
gsonVersion = '2.6.2'
protobufVersion = '3.0.2'
pythagorasVersion = '1.4.1'
typesafeConfigVersion = '1.2.1'
jmhVersion = '1.12'
joclVersion = '2.0.0'
xchartVersion = '3.1.0'
leastsquaresVersion = '1.0.0'
ejmlVersion = '0.29'
ddoglegVersion = '0.9'
guavaVersion = '19.0'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
project(":desktop") {
apply plugin: "java"
sourceCompatibility = javaVersion;
targetCompatibility = javaVersion; // defaults to sourceCompatibility
compileJava.dependsOn(enforceVersion);
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-controllers-desktop:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
}
}
project(":core") {
apply plugin: "java"
sourceCompatibility = javaVersion;
targetCompatibility = javaVersion; // defaults to sourceCompatibility
compileJava.dependsOn(enforceVersion);
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
compile "com.samskivert:pythagoras:$pythagorasVersion"
compile "com.google.protobuf:protobuf-java:$protobufVersion"
compile "com.google.code.gson:gson:$gsonVersion"
compile "com.typesafe:config:$typesafeConfigVersion"
compile "org.openjdk.jmh:jmh-core:$jmhVersion"
compile "org.openjdk.jmh:jmh-generator-annprocess:$jmhVersion"
compile "org.jocl:jocl:$joclVersion"
compile "org.knowm.xchart:xchart:$xchartVersion"
compile "org.orangepalantir:leastsquares:$leastsquaresVersion"
compile "org.ejml:all:$ejmlVersion"
compile "org.ddogleg:ddogleg:$ddoglegVersion"
compile "com.google.guava:guava:$guavaVersion"
testCompile "junit:junit:+"
//compile "net.mikera:vectorz:0.61.0"
}
}
task compileProtocolBuffers(type:Exec) {
workingDir './core/'
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine './compileProtocolBuffers.bat'
} else {
commandLine './compileProtocolBuffers.sh'
}
}
def exportedProjects= [
":core",
":desktop"
]
//Be sure to be located ALWAYS below of subprojects{}
task alljavadoc(type: Javadoc, group: "Documentation") {
description = 'Generates a global javadoc from all the modules'
source exportedProjects.collect { project(it).sourceSets.main.allJava }
classpath = files(exportedProjects.collect { project(it).sourceSets.main.compileClasspath })
options.memberLevel = JavadocMemberLevel.PRIVATE
options.links 'http://docs.oracle.com/javase/8/docs/api/'
options.links 'http://docs.spring.io/spring/docs/current/javadoc-api/'
options.links 'https://developers.google.com/protocol-buffers/docs/reference/java/'
options.links 'https://libgdx.badlogicgames.com/nightlies/docs/api/'
options.links 'http://samskivert.github.io/pythagoras/apidocs/'
destinationDir = file("${buildDir}/docs/javadoc")
}
tasks.eclipse.doLast {
delete ".project"
}
task wrapper(type: Wrapper) {
gradleVersion = '3.2.1'
}