-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
234 lines (197 loc) · 8.49 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
buildscript {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
google()
}
dependencies {
}
}
// Methods to determine the operating system (OS) and architecture (Arch) of the system.
// These strings are used to determine the classifier of the artifact that contains the
// native libaries. For example, when the operating system is "windows" and the
// architecture is "x86_64", then the classifier will be "windows-x86_64", and thus,
// the JAR file containing the native libraries will be
// jcuda-natives-windows-x86_64-11.0.0.jar
// These methods are taken from
// https://github.com/jcuda/jcuda/blob/master/JCudaJava/src/main/java/jcuda/LibUtils.java
def static getOsString() {
String vendor = System.getProperty("java.vendor");
if ("The Android Project" == vendor) {
return "android";
} else {
String osName = System.getProperty("os.name");
osName = osName.toLowerCase(Locale.ENGLISH);
if (osName.startsWith("windows")) {
return "windows";
} else if (osName.startsWith("mac os")) {
return "apple";
} else if (osName.startsWith("linux")) {
return "linux";
} else if (osName.startsWith("sun")) {
return "sun"
}
return "unknown"
}
}
def static getArchString() {
String osArch = System.getProperty("os.arch");
osArch = osArch.toLowerCase(Locale.ENGLISH);
if ("i386" == osArch || "x86" == osArch || "i686" == osArch) {
return "x86";
} else if (osArch.startsWith("amd64") || osArch.startsWith("x86_64")) {
return "x86_64";
} else if (osArch.startsWith("arm64")) {
return "arm64";
} else if (osArch.startsWith("arm")) {
return "arm";
} else if ("ppc" == osArch || "powerpc" == osArch) {
return "ppc";
} else if (osArch.startsWith("ppc")) {
return "ppc_64";
} else if (osArch.startsWith("sparc")) {
return "sparc";
} else if (osArch.startsWith("mips64")) {
return "mips64";
} else if (osArch.startsWith("mips")) {
return "mips";
} else if (osArch.contains("risc")) {
return "risc";
}
return "unknown";
}
allprojects {
apply plugin: "eclipse"
version = '1.0'
ext {
appName = "ProtoEvo"
gdxVersion = '1.12.0'
roboVMVersion = '2.3.16'
box2DLightsVersion = '1.5'
ashleyVersion = '1.7.4'
aiVersion = '1.8.2'
gdxControllersVersion = '2.2.1'
shapedrawerVersion = '2.5.0'
jacksonVersion = '2.14.2'
}
repositories {
mavenLocal()
mavenCentral()
google()
gradlePluginPortal()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://jitpack.io" }
}
}
project(":desktop") {
apply plugin: "java-library"
dependencies {
implementation project(":core")
api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
}
}
project(":core") {
apply plugin: "java-library"
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// Add your other dependencies here:
// JCuda dependencies are below
def classifier = getOsString() + "-" + getArchString()
// Set JCuda version here, or if multiple modules use JCuda,
// you should set a global variable like so:
//
// ext {
// jCudaVersion = "11.0.0"
// }
//
// In your *top level* build gradle, and use
// rootProject.ext.jCudaVersion instead of jCudaVersion when you need to access it
def jCudaVersion = "11.0.0"
// JCuda Java libraries
implementation(group: 'org.jcuda', name: 'jcuda', version: jCudaVersion) {
transitive = false
}
implementation(group: 'org.jcuda', name: 'jcublas', version: jCudaVersion) {
transitive = false
}
implementation(group: 'org.jcuda', name: 'jcufft', version: jCudaVersion) {
transitive = false
}
implementation(group: 'org.jcuda', name: 'jcusparse', version: jCudaVersion) {
transitive = false
}
implementation(group: 'org.jcuda', name: 'jcurand', version: jCudaVersion) {
transitive = false
}
implementation(group: 'org.jcuda', name: 'jcusolver', version: jCudaVersion) {
transitive = false
}
implementation(group: 'org.jcuda', name: 'jcudnn', version: jCudaVersion) {
transitive = false
}
// JCuda native libraries
implementation group: 'org.jcuda', name: 'jcuda-natives',
classifier: classifier, version: jCudaVersion
implementation group: 'org.jcuda', name: 'jcublas-natives',
classifier: classifier, version: jCudaVersion
implementation group: 'org.jcuda', name: 'jcufft-natives',
classifier: classifier, version: jCudaVersion
implementation group: 'org.jcuda', name: 'jcusparse-natives',
classifier: classifier, version: jCudaVersion
implementation group: 'org.jcuda', name: 'jcurand-natives',
classifier: classifier, version: jCudaVersion
implementation group: 'org.jcuda', name: 'jcusolver-natives',
classifier: classifier, version: jCudaVersion
implementation group: 'org.jcuda', name: 'jcudnn-natives',
classifier: classifier, version: jCudaVersion
// implementation 'org.jcuda:jcuda-natives:11.8.0'
// implementation 'org.jcuda:jcuda:11.8.0'0
// val cudaClassifier = "${getOsString()}-${getArchString()}"
// implementation("org.jcuda:jcuda:11.2.0") {
// isTransitive = false
// }
// implementation("org.jcuda:jcuda-natives:11.2.0:$cudaClassifier")
api group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.19.0'
api "com.github.javafaker:javafaker:1.0.2"
api "com.google.guava:guava:31.1-jre"
api "com.google.guava:guava-collections:r03"
testImplementation "org.hamcrest:hamcrest-all:1.3"
testImplementation "org.hamcrest:hamcrest-core:2.1"
testImplementation "org.hamcrest:hamcrest-library:2.1"
testImplementation "junit:junit:4.13.1"
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
api "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
// api group: 'org.jcuda', name: 'jcuda-natives', version: '11.8.0'
api group: 'org.lwjgl', name: 'lwjgl-opencl', version: '3.3.1'
api "com.aparapi:aparapi:2.0.0"
// api 'org.lwjgl.lwjgl:lwjgl:2.9.3'
// api fileTree('libs') { include '*.jar' }
// api file('libs/PixelFlow.jar')
// implementation group: 'org.processing', name: 'core', version: '3.3.6'
implementation "space.earlygrey:shapedrawer:$shapedrawerVersion"
api "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
api "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
api "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion"
api "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:$jacksonVersion"
// api 'de.ruedigermoeller:fst:3.0.3'
api 'de.ruedigermoeller:fst:2.56'
api "com.esotericsoftware:kryo:5.6.0"
api "org.joml:joml:1.10.5"
}
}