mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +07:00
Updated Gradle and AGP to 8
This commit is contained in:
@ -7,7 +7,7 @@ buildscript{
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies{
|
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{
|
android{
|
||||||
buildToolsVersion '33.0.2'
|
namespace = "io.anuke.mindustry"
|
||||||
compileSdkVersion 33
|
buildToolsVersion = '34.0.0'
|
||||||
|
compileSdk = 34
|
||||||
sourceSets{
|
sourceSets{
|
||||||
main{
|
main{
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
@ -56,7 +57,7 @@ android{
|
|||||||
|
|
||||||
applicationId "io.anuke.mindustry"
|
applicationId "io.anuke.mindustry"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 33
|
targetSdkVersion 34
|
||||||
|
|
||||||
versionName versionNameResult
|
versionName versionNameResult
|
||||||
versionCode = vcode
|
versionCode = vcode
|
||||||
@ -65,6 +66,8 @@ android{
|
|||||||
props['androidBuildCode'] = (vcode + 1).toString()
|
props['androidBuildCode'] = (vcode + 1).toString()
|
||||||
}
|
}
|
||||||
props.store(file('../core/assets/version.properties').newWriter(), null)
|
props.store(file('../core/assets/version.properties').newWriter(), null)
|
||||||
|
|
||||||
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions{
|
compileOptions{
|
||||||
@ -72,7 +75,7 @@ android{
|
|||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "google"
|
flavorDimensions = ["google"]
|
||||||
|
|
||||||
signingConfigs{
|
signingConfigs{
|
||||||
release{
|
release{
|
||||||
|
5
android/proguard-rules.pro
vendored
5
android/proguard-rules.pro
vendored
@ -1,11 +1,12 @@
|
|||||||
-dontobfuscate
|
-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 mindustry.** { *; }
|
||||||
-keep class arc.** { *; }
|
-keep class arc.** { *; }
|
||||||
-keep class net.jpountz.** { *; }
|
-keep class net.jpountz.** { *; }
|
||||||
-keep class rhino.** { *; }
|
-keep class rhino.** { *; }
|
||||||
-keep class com.android.dex.** { *; }
|
-keep class com.android.dex.** { *; }
|
||||||
|
-keepattributes Signature,*Annotation*,InnerClasses,EnclosingMethod
|
||||||
|
|
||||||
|
-dontwarn javax.naming.**
|
||||||
|
|
||||||
#-printusage out.txt
|
#-printusage out.txt
|
@ -72,6 +72,8 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClassLoader loadJar(Fi jar, ClassLoader parent) throws Exception{
|
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){
|
return new DexClassLoader(jar.file().getPath(), getFilesDir().getPath(), null, parent){
|
||||||
@Override
|
@Override
|
||||||
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException{
|
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException{
|
||||||
|
@ -25,4 +25,5 @@ org.gradle.caching=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
|
android.enableR8.fullMode=false
|
||||||
archash=b857594d11
|
archash=b857594d11
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
Reference in New Issue
Block a user