mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-09-11 08:15:35 +03:00
includeBuild for Arc
This commit is contained in:
parent
db60fcd64d
commit
695dad201f
30
build.gradle
30
build.gradle
@ -5,6 +5,14 @@ buildscript{
|
||||
}
|
||||
|
||||
arcHash = getArcHash()
|
||||
|
||||
localArc = !project.hasProperty("release") && new File(rootDir.parent, 'Arc').exists() && !project.hasProperty("noLocalArc")
|
||||
|
||||
arcModule = { String name ->
|
||||
//skip to last submodule
|
||||
name = name.substring(name.lastIndexOf(':') + 1)
|
||||
return "com.github.Anuken${localArc ? "" : ".Arc"}:$name:$arcHash"
|
||||
}
|
||||
}
|
||||
|
||||
repositories{
|
||||
@ -16,8 +24,8 @@ buildscript{
|
||||
}
|
||||
|
||||
dependencies{
|
||||
classpath "com.github.Anuken.Arc:packer:$arcHash"
|
||||
classpath "com.github.Anuken.Arc:arc-core:$arcHash"
|
||||
classpath arcModule(":extensions:packer")
|
||||
classpath arcModule(":arc-core")
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,20 +56,6 @@ allprojects{
|
||||
return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
|
||||
}
|
||||
|
||||
localArc = {
|
||||
return !project.hasProperty("release") && !project.hasProperty("noLocalArc") && new File(projectDir.parent, '../Arc').exists()
|
||||
}
|
||||
|
||||
arcModule = { String name ->
|
||||
if(localArc()){
|
||||
return project(":Arc:$name")
|
||||
}else{
|
||||
//skip to last submodule
|
||||
if(name.contains(':')) name = name.split(':').last()
|
||||
return "com.github.Anuken.Arc:$name:${getArcHash()}"
|
||||
}
|
||||
}
|
||||
|
||||
generateDeployName = { String platform ->
|
||||
if(platform == "windows"){
|
||||
platform += "64"
|
||||
@ -331,8 +325,8 @@ project(":core"){
|
||||
api arcModule("extensions:fx")
|
||||
api arcModule("extensions:arcnet")
|
||||
api "com.github.Anuken:rhino:$rhinoVersion"
|
||||
if(localArc() && debugged()) api arcModule("extensions:recorder")
|
||||
if(localArc()) api arcModule(":extensions:packer")
|
||||
if(localArc && debugged()) api arcModule("extensions:recorder")
|
||||
if(localArc) api arcModule(":extensions:packer")
|
||||
|
||||
annotationProcessor 'com.github.Anuken:jabel:0.9.0'
|
||||
compileOnly project(":annotations")
|
||||
|
@ -33,40 +33,16 @@ if(hasSdk){
|
||||
println("No Android SDK found. Skipping Android module.")
|
||||
}
|
||||
|
||||
if(!hasProperty("release")){
|
||||
if(new File(settingsDir, '../Arc').exists()){
|
||||
use(
|
||||
':Arc',
|
||||
':Arc:arc-core',
|
||||
':Arc:extensions',
|
||||
':Arc:extensions:freetype',
|
||||
':Arc:extensions:recorder',
|
||||
':Arc:extensions:arcnet',
|
||||
':Arc:extensions:packer',
|
||||
':Arc:extensions:g3d',
|
||||
':Arc:extensions:fx',
|
||||
':Arc:extensions:flabel',
|
||||
':Arc:extensions:discord',
|
||||
':Arc:extensions:profiling',
|
||||
':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',
|
||||
':Arc:backends',
|
||||
':Arc:backends:backend-sdl',
|
||||
':Arc:backends:backend-android',
|
||||
':Arc:backends:backend-robovm',
|
||||
':Arc:backends:backend-headless'
|
||||
)
|
||||
if(!hasProperty("release") && !hasProperty("noLocalArc")){
|
||||
if(new File(rootDir.parent, 'Arc').exists()){
|
||||
println("Compiling with localArc")
|
||||
includeBuild("../Arc")
|
||||
}
|
||||
|
||||
if(new File(settingsDir, '../Mindustry-Debug').exists()){
|
||||
if(new File(rootDir.parent, 'Mindustry-Debug').exists()){
|
||||
include(":debug")
|
||||
project(":debug").projectDir = new File(settingsDir, "../Mindustry-Debug")
|
||||
project(":debug").projectDir = new File(rootDir.parent, "Mindustry-Debug")
|
||||
}
|
||||
}else{
|
||||
println("Not including local repositories.")
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user