From 65bf97bc03391af175c80aaa6b9407afd66d7f2a Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 28 Mar 2020 17:03:52 -0400 Subject: [PATCH] Removed need for local.properties file --- android/build.gradle | 4 ---- .../src/mindustry/ui/dialogs/PlanetDialog.java | 4 ++-- settings.gradle | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index e82a957ba5..6d9c072a58 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -29,12 +29,10 @@ dependencies{ implementation arcModule("backends:backend-android") implementation 'com.jakewharton.android.repackaged:dalvik-dx:9.0.0_r3' - 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" - natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a" natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86" @@ -119,7 +117,6 @@ android{ // the natives configuration, and extracts them to the proper libs/ folders // so they get packed with the APK. task copyAndroidNatives(){ - file("libs/armeabi/").mkdirs() file("libs/armeabi-v7a/").mkdirs() file("libs/arm64-v8a/").mkdirs() file("libs/x86_64/").mkdirs() @@ -129,7 +126,6 @@ task copyAndroidNatives(){ def outputDir = null if(jar.name.endsWith("natives-arm64-v8a.jar")) outputDir = file("libs/arm64-v8a") if(jar.name.endsWith("natives-armeabi-v7a.jar")) outputDir = file("libs/armeabi-v7a") - if(jar.name.endsWith("natives-armeabi.jar")) outputDir = file("libs/armeabi") if(jar.name.endsWith("natives-x86_64.jar")) outputDir = file("libs/x86_64") if(jar.name.endsWith("natives-x86.jar")) outputDir = file("libs/x86") if(outputDir != null){ diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 74c3f024b7..f6845e3ef6 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -217,8 +217,8 @@ public class PlanetDialog extends FloatingDialog{ draw(sec, shadowColor, -0.001f); } - if(sec.hostility >= 0f){ - drawSelection(sec, Color.scarlet, 0.1f * sec.hostility); + if(sec.hostility >= 0.02f){ + drawSelection(sec, Color.scarlet, 0.11f * sec.hostility); } } diff --git a/settings.gradle b/settings.gradle index 8f7f936222..8d04900366 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,16 +7,18 @@ def use = { ... names -> } } -def properties = new Properties() +def hasSdk = System.getenv("ANDROID_HOME") != null -if(new File(settingsDir, 'local.properties').exists() && System.getenv("JITPACK") != "true"){ - properties.load(new File(settingsDir, 'local.properties').newDataInputStream()) +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 +} - if(properties.containsKey("sdk.dir")){ - include 'android' - }else{ - println("No android SDK dir found Not loading Android module.") - } +if(System.getenv("JITPACK") == "true") hasSdk = false + +if(hasSdk){ + include 'android' }else{ println("No local.properties found. Not loading Android module.") }