localArc should now work without jitpack
This commit is contained in:
@@ -41,6 +41,9 @@ android{
|
|||||||
res.srcDirs = ['res']
|
res.srcDirs = ['res']
|
||||||
assets.srcDirs = ['assets', 'src/main/assets', '../core/assets/']
|
assets.srcDirs = ['assets', 'src/main/assets', '../core/assets/']
|
||||||
jniLibs.srcDirs = ['libs']
|
jniLibs.srcDirs = ['libs']
|
||||||
|
if(localArc){
|
||||||
|
jniLibs.srcDirs += ['../../Arc/natives/natives-android/libs', '../../Arc/natives/natives-freetype-android/libs']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
androidTest.setRoot('tests')
|
androidTest.setRoot('tests')
|
||||||
@@ -122,10 +125,7 @@ dependencies{
|
|||||||
implementation arcModule("backends:backend-android")
|
implementation arcModule("backends:backend-android")
|
||||||
implementation 'com.jakewharton.android.repackaged:dalvik-dx:9.0.0_r3'
|
implementation 'com.jakewharton.android.repackaged:dalvik-dx:9.0.0_r3'
|
||||||
|
|
||||||
if(localArc){
|
if(!localArc){
|
||||||
natives arcModule(":natives-android")
|
|
||||||
natives arcModule(":natives-freetype-android")
|
|
||||||
}else{
|
|
||||||
natives "com.github.Anuken.Arc:natives-android:$arcHash"
|
natives "com.github.Anuken.Arc:natives-android:$arcHash"
|
||||||
natives "com.github.Anuken.Arc:natives-freetype-android:$arcHash"
|
natives "com.github.Anuken.Arc:natives-freetype-android:$arcHash"
|
||||||
}
|
}
|
||||||
@@ -141,14 +141,13 @@ dependencies{
|
|||||||
}
|
}
|
||||||
|
|
||||||
task copyAndroidNatives(){
|
task copyAndroidNatives(){
|
||||||
if(localArc){
|
if(!localArc){
|
||||||
dependsOn "com.github.Anuken:natives-android:jar", "com.github.Anuken:natives-freetype-android:jar"
|
configurations.natives.files.each{ jar ->
|
||||||
}
|
copy{
|
||||||
configurations.natives.files.each{ jar ->
|
from zipTree(jar)
|
||||||
copy{
|
into file("libs/")
|
||||||
from zipTree(jar)
|
include "**"
|
||||||
into file("libs/")
|
}
|
||||||
include "**"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ if(!hasProperty("release") && !hasProperty("noLocalArc")){
|
|||||||
if(new File(rootDir.parent, 'Arc').exists()){
|
if(new File(rootDir.parent, 'Arc').exists()){
|
||||||
println("Compiling with localArc")
|
println("Compiling with localArc")
|
||||||
includeBuild("../Arc")
|
includeBuild("../Arc")
|
||||||
|
}else{
|
||||||
|
println("Local Arc not found. Cloning https://github.com/Anuken/Arc to a directory next to Mindustry is highly recommended, as jitpack is unreliable.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if(new File(rootDir.parent, 'Mindustry-Debug').exists()){
|
if(new File(rootDir.parent, 'Mindustry-Debug').exists()){
|
||||||
|
|||||||
Reference in New Issue
Block a user