2017-04-30 04:25:59 +03:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
mavenCentral()
|
2017-12-20 04:51:46 +03:00
|
|
|
google()
|
2017-04-30 04:25:59 +03:00
|
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
dependencies {
|
2018-04-27 23:01:37 +03:00
|
|
|
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.0'
|
2017-04-30 04:25:59 +03:00
|
|
|
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
|
2018-07-12 02:57:27 +03:00
|
|
|
classpath 'com.android.tools.build:gradle:3.1.3'
|
2018-01-26 23:09:13 +03:00
|
|
|
classpath "com.badlogicgames.gdx:gdx-tools:1.9.8"
|
2017-04-30 04:25:59 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
apply plugin: "eclipse"
|
|
|
|
apply plugin: "idea"
|
|
|
|
|
2017-12-19 08:05:41 +03:00
|
|
|
version = 'release'
|
2018-02-22 03:50:27 +03:00
|
|
|
|
2017-04-30 04:25:59 +03:00
|
|
|
ext {
|
2018-04-22 01:39:49 +03:00
|
|
|
versionNumber = '4.0'
|
2018-07-02 20:54:22 +03:00
|
|
|
versionType = 'alpha'
|
2018-02-09 07:41:07 +03:00
|
|
|
appName = 'Mindustry'
|
2017-12-22 04:59:40 +03:00
|
|
|
gdxVersion = '1.9.8'
|
2018-04-27 23:01:37 +03:00
|
|
|
roboVMVersion = '2.3.0'
|
2017-12-22 04:59:40 +03:00
|
|
|
aiVersion = '1.8.1'
|
2018-07-21 01:41:08 +03:00
|
|
|
uCoreVersion = 'b93d02efe3fdbe1a10b33d59597da8693d4f7de3'
|
2018-02-09 07:41:07 +03: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)
|
|
|
|
}
|
2018-05-03 20:04:30 +03:00
|
|
|
|
|
|
|
writeVersion = {
|
|
|
|
def pfile = new File('core/assets/version.properties')
|
|
|
|
def props = new Properties()
|
|
|
|
|
|
|
|
try{
|
|
|
|
pfile.createNewFile()
|
|
|
|
}catch (Exception e){}
|
|
|
|
|
|
|
|
if(pfile.exists()) {
|
|
|
|
|
|
|
|
props.load(new FileInputStream(pfile))
|
|
|
|
|
|
|
|
String code = getBuildVersion()
|
|
|
|
|
|
|
|
props["name"] = appName
|
|
|
|
props["version"] = versionType
|
|
|
|
props["code"] = versionNumber
|
|
|
|
props["build"] = code
|
|
|
|
|
|
|
|
props.store(pfile.newWriter(), "Autogenerated file. Do not modify.")
|
|
|
|
}
|
|
|
|
}
|
2017-04-30 04:25:59 +03: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 07:54:10 +03:00
|
|
|
maven { url 'https://jitpack.io' }
|
2017-04-30 04:25:59 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
project(":desktop") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
2018-01-01 21:32:18 +03:00
|
|
|
compile project(":kryonet")
|
2017-04-30 04:25:59 +03:00
|
|
|
compile "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
|
|
|
|
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
2017-12-23 02:10:34 +03:00
|
|
|
compile "com.badlogicgames.gdx:gdx-controllers-lwjgl3:$gdxVersion"
|
2018-05-14 07:43:53 +03:00
|
|
|
compile 'com.github.MinnDevelopment:java-discord-rpc:v2.0.0'
|
2018-06-01 20:01:05 +03:00
|
|
|
compile 'com.yuvimasory:orange-extensions:1.3.0'
|
2017-04-30 04:25:59 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
project(":html") {
|
|
|
|
apply plugin: "gwt"
|
|
|
|
apply plugin: "war"
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
2018-06-10 00:05:47 +03:00
|
|
|
compileOnly project(":annotations")
|
|
|
|
|
2017-04-30 04:25:59 +03:00
|
|
|
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 04:59:40 +03:00
|
|
|
compile "com.badlogicgames.gdx:gdx-ai:$aiVersion:sources"
|
2017-12-23 02:10:34 +03: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 01:28:33 +03:00
|
|
|
compile "com.sksamuel.gwt:gwt-websockets:1.0.4"
|
|
|
|
compile "com.sksamuel.gwt:gwt-websockets:1.0.4:sources"
|
2017-04-30 04:25:59 +03:00
|
|
|
}
|
2018-06-10 00:05:47 +03:00
|
|
|
|
|
|
|
compileJava.options.compilerArgs = [
|
|
|
|
"-processor", "io.anuke.annotations.RemoteMethodAnnotationProcessor"
|
|
|
|
]
|
2017-04-30 04:25:59 +03:00
|
|
|
}
|
|
|
|
|
2018-04-27 23:01:37 +03:00
|
|
|
project(":ios") {
|
|
|
|
apply plugin: "java"
|
|
|
|
apply plugin: "robovm"
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
2018-04-28 06:42:59 +03:00
|
|
|
implementation project(":kryonet")
|
|
|
|
|
2018-04-27 23:01:37 +03:00
|
|
|
compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
|
|
|
|
compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
|
|
|
|
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
|
|
|
|
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-30 04:25:59 +03:00
|
|
|
project(":core") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
dependencies {
|
2018-06-06 21:51:25 +03:00
|
|
|
compileOnly project(":annotations")
|
2018-05-12 17:30:23 +03:00
|
|
|
|
2018-05-10 02:46:25 +03:00
|
|
|
boolean comp = System.properties["release"] == null || System.properties["release"] == "false"
|
2017-12-25 04:50:00 +03:00
|
|
|
|
|
|
|
if(!comp){
|
|
|
|
println("NOTICE: Compiling release build.")
|
|
|
|
}else{
|
2018-01-27 02:29:31 +03:00
|
|
|
println("Compiling DEBUG build.")
|
2017-12-25 04:50:00 +03:00
|
|
|
}
|
|
|
|
|
2018-05-09 19:46:24 +03:00
|
|
|
if(new File(projectDir.parent, '../uCore').exists() && comp){
|
2017-12-22 00:45:25 +03:00
|
|
|
compile project(":uCore")
|
|
|
|
}else{
|
2017-12-22 04:59:40 +03:00
|
|
|
compile "com.github.anuken:ucore:$uCoreVersion"
|
2017-12-22 00:45:25 +03:00
|
|
|
}
|
2017-12-25 04:50:00 +03:00
|
|
|
|
2018-05-16 06:03:03 +03:00
|
|
|
if(new File(projectDir.parent, '../GDXGifRecorder').exists() && comp) {
|
2017-12-22 05:56:01 +03:00
|
|
|
compile project(":GDXGifRecorder")
|
|
|
|
}
|
2018-05-12 17:30:23 +03:00
|
|
|
|
2017-04-30 04:25:59 +03:00
|
|
|
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
2017-12-23 02:10:34 +03:00
|
|
|
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
|
2017-04-30 04:25:59 +03:00
|
|
|
}
|
2018-05-12 17:30:23 +03:00
|
|
|
|
2018-06-06 21:51:25 +03:00
|
|
|
compileJava.options.compilerArgs = [
|
|
|
|
"-processor", "io.anuke.annotations.RemoteMethodAnnotationProcessor"
|
|
|
|
]
|
2017-04-30 04:25:59 +03:00
|
|
|
}
|
|
|
|
|
2018-01-28 07:42:42 +03:00
|
|
|
project(":server") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
2018-07-14 05:02:13 +03:00
|
|
|
configurations {
|
|
|
|
compile.exclude module: android
|
|
|
|
}
|
|
|
|
|
2018-01-28 07:42:42 +03:00
|
|
|
dependencies {
|
2018-06-15 00:11:38 +03:00
|
|
|
compileOnly project(":annotations")
|
|
|
|
|
2018-01-28 07:42:42 +03:00
|
|
|
compile project(":core")
|
|
|
|
compile project(":kryonet")
|
|
|
|
compile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion"
|
2018-01-28 09:21:33 +03:00
|
|
|
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
|
2018-01-28 07:42:42 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-06-16 01:06:05 +03:00
|
|
|
project(":packer") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-12 17:30:23 +03:00
|
|
|
project(":annotations") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
2018-05-14 02:41:50 +03:00
|
|
|
dependencies {
|
|
|
|
compile 'com.squareup:javapoet:1.11.0'
|
|
|
|
}
|
2018-05-12 17:30:23 +03:00
|
|
|
}
|
|
|
|
|
2018-01-01 21:32:18 +03:00
|
|
|
project(":kryonet") {
|
|
|
|
apply plugin: "java"
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(":core")
|
2018-01-02 00:09:17 +03:00
|
|
|
compile 'com.github.crykn:kryonet:2.22.1'
|
2018-01-18 01:28:33 +03:00
|
|
|
compile "org.java-websocket:Java-WebSocket:1.3.7"
|
2018-01-01 21:32:18 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-30 04:25:59 +03:00
|
|
|
tasks.eclipse.doLast {
|
|
|
|
delete ".project"
|
2017-05-20 23:20:38 +03:00
|
|
|
}
|