-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
89 lines (72 loc) · 2.15 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
allprojects {
version = '1.0.0'
ext {
kawaJar = System.getenv('KAWA_JAR')
gdxVersion = '1.9.2'
}
repositories {
mavenCentral()
}
}
project(":desktop") {
apply plugin: 'java'
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
def classesDir = new File("build/classes")
dependencies {
compile files(project.kawaJar)
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
}
task compile(type: Exec, dependsOn: clean) {
commandLine '../script/kawa-desktop-compile.sh'
}
task uberJar(type: Jar, dependsOn: compile) {
from files(classesDir)
from files(new File('../all/assets'))
from {configurations.compile.collect {zipTree(it)}}
manifest {
attributes 'Main-Class': 'org.libgdx.example.core'
}
}
task run(type: JavaExec) {
main="-jar"
args files("build/libs/desktop-${version}.jar")
ignoreExitValue=true
}
}
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":all")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
compile files(project.kawaJar)
compile files('build/libgdx-example.jar')
}
}
project(":all") {
apply plugin: "java"
sourceCompatibility = 1.7
targetCompatibility = 1.7
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
}
}
task compile(dependsOn: ':desktop:compile') {}