v3.1.0: updated AGP, compile/target Android SDK, and gradle
This commit is contained in:
@@ -29,8 +29,12 @@ import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.window.OnBackInvokedCallback;
|
||||
import android.window.OnBackInvokedDispatcher;
|
||||
|
||||
import com.badlogic.gdx.Files;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
||||
import com.badlogic.gdx.backends.android.AndroidAudio;
|
||||
@@ -44,6 +48,7 @@ import com.shatteredpixel.shatteredpixeldungeon.services.news.NewsImpl;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.services.updates.UpdateImpl;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.services.updates.Updates;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.Button;
|
||||
import com.watabou.input.KeyEvent;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.utils.FileUtils;
|
||||
|
||||
@@ -85,6 +90,7 @@ public class AndroidLauncher extends AndroidApplication {
|
||||
Game.versionCode = 0;
|
||||
}
|
||||
|
||||
Gdx.app = this;
|
||||
if (UpdateImpl.supportsUpdates()) {
|
||||
Updates.service = UpdateImpl.getUpdateService();
|
||||
}
|
||||
@@ -103,7 +109,19 @@ public class AndroidLauncher extends AndroidApplication {
|
||||
} else {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
|
||||
//Shattered still overrides the back gesture behaviour, but we need to do it in a new way
|
||||
// (API added in Android 13, functionality enforced in Android 16)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
getOnBackInvokedDispatcher().registerOnBackInvokedCallback(OnBackInvokedDispatcher.PRIORITY_DEFAULT, new OnBackInvokedCallback() {
|
||||
@Override
|
||||
public void onBackInvoked() {
|
||||
KeyEvent.addKeyEvent(new KeyEvent(Input.Keys.BACK, true));
|
||||
KeyEvent.addKeyEvent(new KeyEvent(Input.Keys.BACK, false));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//set desired orientation (if it exists) before initializing the app.
|
||||
if (SPDSettings.landscape() != null) {
|
||||
instance.setRequestedOrientation( SPDSettings.landscape() ?
|
||||
|
||||
@@ -7,7 +7,7 @@ buildscript {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.7.1'
|
||||
classpath 'com.android.tools.build:gradle:8.9.1'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ allprojects {
|
||||
|
||||
appJavaCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
appAndroidCompileSDK = 34
|
||||
appAndroidMinSDK = 14
|
||||
appAndroidTargetSDK = 34
|
||||
appAndroidCompileSDK = 36 //Android 16
|
||||
appAndroidMinSDK = 14 //Android 4.0
|
||||
appAndroidTargetSDK = 36 //Android 16
|
||||
|
||||
gdxVersion = '1.12.1'
|
||||
gdxControllersVersion = '2.2.4-SNAPSHOT'
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
Reference in New Issue
Block a user