2020-04-03 05:45:13 +03:00
if ( JavaVersion . current ( ) ! = JavaVersion . VERSION_1_8 ) {
throw new GradleException ( "!!! YOU MUST USE JAVA 8 TO COMPILE AND RUN MINDUSTRY !!! Read the README. Your version: ${System.properties[" java . version "]}" )
}
2019-09-07 23:55:09 +03:00
include 'desktop' , 'core' , 'server' , 'ios' , 'annotations' , 'tools' , 'tests'
2018-10-24 20:07:51 +03:00
2020-03-25 07:18:40 +03:00
def use = { . . . names - >
for ( String name : names ) {
include ( name )
project ( name ) . projectDir = new File ( settingsDir , "../${name.substring(1).replace(" : ", " / ")}" )
}
2018-12-26 21:22:31 +03:00
}
2020-03-29 00:03:52 +03:00
def hasSdk = System . getenv ( "ANDROID_HOME" ) ! = null
2018-10-24 20:07:51 +03:00
2020-03-29 00:03:52 +03:00
if ( new File ( settingsDir , 'local.properties' ) . exists ( ) ) {
def properties = new Properties ( )
properties . load ( new File ( settingsDir , 'local.properties' ) . newDataInputStream ( ) )
if ( properties . containsKey ( "sdk.dir" ) ) hasSdk = true
}
2018-10-24 20:07:51 +03:00
2020-03-29 00:03:52 +03:00
if ( System . getenv ( "JITPACK" ) = = "true" ) hasSdk = false
if ( hasSdk ) {
include 'android'
2018-10-24 20:07:51 +03:00
} else {
println ( "No local.properties found. Not loading Android module." )
}
2017-12-22 00:46:33 +03:00
2019-03-23 20:40:13 +03:00
if ( ! hasProperty ( "release" ) ) {
2019-04-08 16:03:18 +03:00
if ( new File ( settingsDir , '../Arc' ) . exists ( ) ) {
2020-03-25 07:18:40 +03:00
use (
2020-04-30 01:29:19 +03:00
':Arc' ,
':Arc:arc-core' ,
':Arc:extensions' ,
':Arc:extensions:freetype' ,
':Arc:extensions:recorder' ,
':Arc:extensions:arcnet' ,
2020-03-25 07:18:40 +03:00
':Arc:extensions:packer' ,
2020-05-01 03:03:11 +03:00
':Arc:extensions:box2d' ,
2020-03-25 07:18:40 +03:00
':Arc:extensions:g3d' ,
2020-04-30 01:29:19 +03:00
':Arc:extensions:fx' ,
':Arc:natives' ,
':Arc:natives:natives-desktop' ,
':Arc:natives:natives-android' ,
':Arc:natives:natives-ios' ,
':Arc:natives:natives-freetype-desktop' ,
':Arc:natives:natives-freetype-android' ,
':Arc:natives:natives-freetype-ios' ,
2020-05-01 03:03:11 +03:00
':Arc:natives:natives-box2d-desktop' ,
':Arc:natives:natives-box2d-android' ,
2020-05-01 05:56:43 +03:00
':Arc:natives:natives-box2d-ios' ,
2020-04-30 01:29:19 +03:00
':Arc:backends' ,
':Arc:backends:backend-sdl' ,
2020-03-25 07:18:40 +03:00
':Arc:backends:backend-android' ,
':Arc:backends:backend-robovm' ,
':Arc:backends:backend-headless'
)
2017-12-25 04:50:00 +03:00
}
2020-04-30 01:29:19 +03:00
2019-09-21 23:44:47 +03:00
if ( new File ( settingsDir , '../Mindustry-Debug' ) . exists ( ) ) {
include ( ":debug" )
project ( ":debug" ) . projectDir = new File ( settingsDir , "../Mindustry-Debug" )
2018-09-11 02:33:12 +03:00
}
2017-12-25 04:50:00 +03:00
} else {
println ( "Not including local repositories." )
2017-12-22 05:56:01 +03:00
}