forked from libgdx/libgdx-demo-pax-britannica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
181 lines (143 loc) · 6.05 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
import groovy.json.JsonSlurper
buildscript {
ant.get(src: 'http://libgdx.badlogicgames.com/libgdx-site/service/getVersions?release=false', dest: 'versions.json')
def versionFile = file('versions.json')
def json
if (versionFile.exists()) {
json = new JsonSlurper().parseText(versionFile.text)
} else throw new GradleException("Unable to retrieve latest versions, please check your internet connection")
ext {
gdxVersion = json.libgdxRelease
roboVMVersion = json.robovmVersion
roboVMGradleVersion = json.robovmPluginVersion
androidToolsVersion = json.androidBuildtoolsVersion
androidSDKVersion = json.androidSDKVersion
androidGradleToolsVersion = '3.4.1'
gwtVersion = json.gwtVersion
gwtGradleVersion = json.gwtPluginVersion
}
//Defines the repositories that are required by this script, e.g. android plugin
repositories {
//maven central repository, needed for the android plugin
mavenCentral()
mavenLocal()
google()
maven { url "https://plugins.gradle.org/m2/" }
jcenter()
//repository for libgdx artifacts
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath "org.wisepersist:gwt-gradle-plugin:$gwtGradleVersion"
classpath "com.android.tools.build:gradle:$androidGradleToolsVersion"
classpath "com.mobidevelop.robovm:robovm-gradle-plugin:$roboVMGradleVersion"
classpath "com.excelsiorjet:excelsior-jet-gradle-plugin:1.3.3"
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = "1.1"
ext {
appName = "Pax-Britannica Enchanced"
}
//Defines the repositories that are required by this script, e.g. android plugin
repositories {
google()
mavenLocal()
jcenter()
//maven central repository, needed for the android plugin
mavenCentral()
//repository for libgdx artifacts
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
project(":core") {
apply plugin: "java-library"
dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
api "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
}
}
project(":desktop") {
apply plugin: "java-library"
apply plugin: 'excelsiorJet'
dependencies {
implementation project(":core")
api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
api "com.badlogicgames.gdx:gdx-controllers-desktop:$gdxVersion"
api "com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop"
}
excelsiorJet {
product = 'Pax Britannica Enchanced'
vendor = 'LibGDX'
outputName = 'Pax Britannica Enchanced'
artifactName = 'Pax Britannica Enchanced'
mainClass 'de.swagner.paxbritannica.desktop.DesktopLauncher'
packageFilesDir(new File(project.rootProject.projectDir, "/android/assets"))
hideConsole = true
globalOptimizer = true
packaging = 'native-bundle'
jvmArgs = ["-Duser.dir=*{exe.dir}", "-Djet.cd.to.user.dir"]
osxBundle {
identifier = 'libgdx.paxbritannica'
}
}
}
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
implementation project(":core")
api "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
api "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
api "com.badlogicgames.gdx:gdx-controllers-android:$gdxVersion"
}
}
project(":html") {
apply plugin: "java-library"
apply plugin: "gwt"
apply plugin: "war"
// webAppDirName = 'webapp'
dependencies {
implementation project(":core")
api "com.github.intrigus.gdx-freetype-gwt:gdx-freetype-gwt:0.0.2-SNAPSHOT"
api "com.github.intrigus.gdx-freetype-gwt:gdx-freetype-gwt:0.0.2-SNAPSHOT:sources"
api "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
api "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
api "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
api "com.badlogicgames.gdx:gdx-controllers:$gdxVersion:sources"
api "com.badlogicgames.gdx:gdx-controllers-gwt:$gdxVersion"
api "com.badlogicgames.gdx:gdx-controllers-gwt:$gdxVersion:sources"
}
}
project(":ios") {
apply plugin: 'java-library'
apply plugin: 'robovm'
configurations { natives }
dependencies {
implementation project(":core")
api "com.mobidevelop.robovm:robovm-rt:${roboVMVersion}"
api "com.mobidevelop.robovm:robovm-cocoatouch:${roboVMVersion}"
api "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
implementation "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
}
}
tasks.eclipse.doLast {
delete ".project"
}