Updated Gradle and AGP to 8
This commit is contained in:
@@ -7,7 +7,7 @@ buildscript{
|
||||
}
|
||||
|
||||
dependencies{
|
||||
classpath 'com.android.tools.build:gradle:7.2.1'
|
||||
classpath 'com.android.tools.build:gradle:8.5.0'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,9 @@ task deploy(type: Copy){
|
||||
}
|
||||
|
||||
android{
|
||||
buildToolsVersion '33.0.2'
|
||||
compileSdkVersion 33
|
||||
namespace = "io.anuke.mindustry"
|
||||
buildToolsVersion = '34.0.0'
|
||||
compileSdk = 34
|
||||
sourceSets{
|
||||
main{
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
@@ -56,7 +57,7 @@ android{
|
||||
|
||||
applicationId "io.anuke.mindustry"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 33
|
||||
targetSdkVersion 34
|
||||
|
||||
versionName versionNameResult
|
||||
versionCode = vcode
|
||||
@@ -65,6 +66,8 @@ android{
|
||||
props['androidBuildCode'] = (vcode + 1).toString()
|
||||
}
|
||||
props.store(file('../core/assets/version.properties').newWriter(), null)
|
||||
|
||||
multiDexEnabled true
|
||||
}
|
||||
|
||||
compileOptions{
|
||||
@@ -72,7 +75,7 @@ android{
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
flavorDimensions "google"
|
||||
flavorDimensions = ["google"]
|
||||
|
||||
signingConfigs{
|
||||
release{
|
||||
|
||||
5
android/proguard-rules.pro
vendored
5
android/proguard-rules.pro
vendored
@@ -1,11 +1,12 @@
|
||||
-dontobfuscate
|
||||
|
||||
#these are essential packages that should not be "optimized" in any way
|
||||
#the main purpose of d8 here is to shrink the absurdly-large google play games libraries
|
||||
-keep class mindustry.** { *; }
|
||||
-keep class arc.** { *; }
|
||||
-keep class net.jpountz.** { *; }
|
||||
-keep class rhino.** { *; }
|
||||
-keep class com.android.dex.** { *; }
|
||||
-keepattributes Signature,*Annotation*,InnerClasses,EnclosingMethod
|
||||
|
||||
-dontwarn javax.naming.**
|
||||
|
||||
#-printusage out.txt
|
||||
@@ -72,6 +72,8 @@ public class AndroidLauncher extends AndroidApplication{
|
||||
|
||||
@Override
|
||||
public ClassLoader loadJar(Fi jar, ClassLoader parent) throws Exception{
|
||||
//Required to load jar files in Android 14: https://developer.android.com/about/versions/14/behavior-changes-14#safer-dynamic-code-loading
|
||||
jar.file().setReadOnly();
|
||||
return new DexClassLoader(jar.file().getPath(), getFilesDir().getPath(), null, parent){
|
||||
@Override
|
||||
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException{
|
||||
|
||||
Reference in New Issue
Block a user