2017-04-30 08:25:59 +07:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
2017-12-20 08:51:46 +07:00
|
|
|
google()
|
2017-04-30 08:25:59 +07:00
|
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
|
2017-12-20 07:17:17 +07:00
|
|
|
classpath 'com.android.tools.build:gradle:3.0.1'
|
2018-01-27 03:09:13 +07:00
|
|
|
classpath "com.badlogicgames.gdx:gdx-tools:1.9.8"
|
2017-04-30 08:25:59 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
apply plugin: "eclipse"
|
|
|
|
apply plugin: "idea"
|
|
|
|
|
2017-12-19 12:05:41 +07:00
|
|
|
version = 'release'
|
2018-02-22 03:07:49 +07:00
|
|
|
|
2017-04-30 08:25:59 +07:00
|
|
|
ext {
|
2018-02-09 11:41:07 +07:00
|
|
|
versionNumber = '3.3'
|
2018-02-22 03:07:49 +07:00
|
|
|
versionType = 'release'
|
2018-02-09 11:41:07 +07:00
|
|
|
appName = 'Mindustry'
|
2017-12-22 08:59:40 +07:00
|
|
|
gdxVersion = '1.9.8'
|
|
|
|
aiVersion = '1.8.1'
|
2018-02-20 02:57:43 +07:00
|
|
|
uCoreVersion = 'a95630d'
|
2018-02-09 11:41:07 +07:00
|
|
|
|
|
|
|
getVersionString = {
|
|
|
|
String buildVersion = getBuildVersion()
|
|
|
|
return "$versionNumber-$versionType-$buildVersion"
|
|
|
|
}
|
|
|
|
|
|
|
|
getBuildVersion = {
|
|
|
|
if(!project.hasProperty("buildversion")) return "custom build"
|
|
|
|
return project.getProperties()["buildversion"]
|
|
|
|
}
|
|
|
|
|
|
|
|
getPackage = {
|
|
|
|
return project.ext.mainClassName.substring(0, project.ext.mainClassName.indexOf("desktop") - 1)
|
|
|
|
}
|
2017-04-30 08:25:59 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
|
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
|
|
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
|
2017-06-29 11:54:10 +07:00
|
|
|
maven { url 'https://jitpack.io' }
|
2017-04-30 08:25:59 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
project(":desktop") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
2018-01-02 01:32:18 +07:00
|
|
|
compile project(":kryonet")
|
2017-04-30 08:25:59 +07:00
|
|
|
compile "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
|
|
|
|
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
2017-12-23 06:10:34 +07:00
|
|
|
compile "com.badlogicgames.gdx:gdx-controllers-lwjgl3:$gdxVersion"
|
2018-01-25 04:48:07 +07:00
|
|
|
compile 'com.github.MinnDevelopment:java-discord-rpc:v1.3.2'
|
2017-04-30 08:25:59 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
project(":html") {
|
|
|
|
apply plugin: "gwt"
|
|
|
|
apply plugin: "war"
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
|
|
|
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
|
|
|
|
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
|
|
|
|
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
|
2017-12-22 08:59:40 +07:00
|
|
|
compile "com.badlogicgames.gdx:gdx-ai:$aiVersion:sources"
|
2017-12-23 06:10:34 +07:00
|
|
|
|
|
|
|
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion:sources"
|
|
|
|
compile "com.badlogicgames.gdx:gdx-controllers-gwt:$gdxVersion"
|
|
|
|
compile "com.badlogicgames.gdx:gdx-controllers-gwt:$gdxVersion:sources"
|
2018-01-18 05:28:33 +07:00
|
|
|
compile "com.sksamuel.gwt:gwt-websockets:1.0.4"
|
|
|
|
compile "com.sksamuel.gwt:gwt-websockets:1.0.4:sources"
|
2017-04-30 08:25:59 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-06-29 11:54:10 +07:00
|
|
|
project(":android") {
|
|
|
|
apply plugin: "android"
|
|
|
|
|
|
|
|
configurations { natives }
|
|
|
|
|
|
|
|
dependencies {
|
2018-02-02 07:31:13 +07:00
|
|
|
implementation project(":core")
|
|
|
|
implementation project(":kryonet")
|
|
|
|
implementation "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
|
2017-06-29 11:54:10 +07:00
|
|
|
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"
|
2018-02-02 07:31:13 +07:00
|
|
|
implementation "com.badlogicgames.gdx:gdx-ai:$aiVersion"
|
|
|
|
implementation "com.badlogicgames.gdx:gdx-controllers-android:$gdxVersion"
|
2017-06-29 11:54:10 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-30 08:25:59 +07:00
|
|
|
project(":core") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
dependencies {
|
2018-01-27 06:29:31 +07:00
|
|
|
boolean comp = System.properties["release"] == null || System.properties["release"].equals("false")
|
2017-12-25 08:50:00 +07:00
|
|
|
|
|
|
|
if(!comp){
|
|
|
|
println("NOTICE: Compiling release build.")
|
|
|
|
}else{
|
2018-01-27 06:29:31 +07:00
|
|
|
println("Compiling DEBUG build.")
|
2017-12-25 08:50:00 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
if(new File('../uCore').exists() && comp){
|
2017-12-22 04:45:25 +07:00
|
|
|
compile project(":uCore")
|
|
|
|
}else{
|
2017-12-22 08:59:40 +07:00
|
|
|
compile "com.github.anuken:ucore:$uCoreVersion"
|
2017-12-22 04:45:25 +07:00
|
|
|
}
|
2017-12-25 08:50:00 +07:00
|
|
|
|
|
|
|
if(new File('../GDXGifRecorder').exists() && comp) {
|
2017-12-22 09:56:01 +07:00
|
|
|
compile project(":GDXGifRecorder")
|
|
|
|
}
|
2017-04-30 08:25:59 +07:00
|
|
|
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
2017-12-22 08:59:40 +07:00
|
|
|
compile "com.badlogicgames.gdx:gdx-ai:$aiVersion"
|
2017-12-23 06:10:34 +07:00
|
|
|
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
|
2017-04-30 08:25:59 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-28 11:42:42 +07:00
|
|
|
project(":server") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
|
|
|
compile project(":kryonet")
|
|
|
|
compile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
|
2018-01-28 13:21:33 +07:00
|
|
|
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
2018-01-28 11:42:42 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-02 01:32:18 +07:00
|
|
|
project(":kryonet") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
2018-01-02 04:09:17 +07:00
|
|
|
compile 'com.github.crykn:kryonet:2.22.1'
|
2018-01-18 05:28:33 +07:00
|
|
|
compile "org.java-websocket:Java-WebSocket:1.3.7"
|
2018-01-02 01:32:18 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-30 08:25:59 +07:00
|
|
|
tasks.eclipse.doLast {
|
|
|
|
delete ".project"
|
2017-05-21 03:20:38 +07:00
|
|
|
}
|