Update android to target sdk 33
This commit is contained in:
parent
b4fff82dc1
commit
eac07c8f5c
@ -1,8 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.supertuxkart.stk_dbg"
|
||||
android:versionCode="1"
|
||||
android:versionName="git"
|
||||
android:installLocation="auto">
|
||||
|
||||
<application android:label="@string/app_name"
|
||||
@ -18,7 +15,8 @@
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|uiMode"
|
||||
android:screenOrientation="sensorLandscape">
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -11,7 +11,7 @@ buildscript
|
||||
// 4.1.2 is the minimum version to support native debug symbols file
|
||||
// https://developer.android.com/studio/build/shrink-code#android_gradle_plugin_version_41_or_later
|
||||
// 7.0.0 to fix https://stackoverflow.com/questions/68387270/android-studio-error-installed-build-tools-revision-31-0-0-is-corrupted
|
||||
classpath 'com.android.tools.build:gradle:7.0.0'
|
||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,6 +28,8 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android
|
||||
{
|
||||
// Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
|
||||
namespace project.getProperty('package_name')
|
||||
// buildToolsVersion is no longer needed https://developer.android.com/studio/releases/gradle-plugin.html#behavior_changes_1
|
||||
// Quote:
|
||||
// Build Tools 27.0.3 or higher. Keep in mind, you no longer need to specify a version for the build tools using the android.buildToolsVersion property—the plugin uses the minimum required version by default.
|
||||
@ -43,6 +45,8 @@ android
|
||||
|
||||
defaultConfig
|
||||
{
|
||||
versionCode project.getProperty('version_code').toInteger()
|
||||
versionName project.getProperty('version_name')
|
||||
minSdkVersion min_sdk_version.toInteger()
|
||||
targetSdkVersion target_sdk_version.toInteger()
|
||||
externalNativeBuild
|
||||
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
|
||||
|
@ -20,7 +20,7 @@ if [ -z "$STK_MIN_ANDROID_SDK" ]; then
|
||||
fi
|
||||
|
||||
if [ -z "$STK_TARGET_ANDROID_SDK" ]; then
|
||||
export STK_TARGET_ANDROID_SDK=30
|
||||
export STK_TARGET_ANDROID_SDK=33
|
||||
fi
|
||||
|
||||
if [ -z "$STK_NDK_VERSION" ]; then
|
||||
@ -369,9 +369,6 @@ echo " <background android:drawable=\"@drawable/icon_bg\" />" >> "$ADAP
|
||||
echo " <foreground android:drawable=\"@drawable/icon_fg\" />" >> "$ADAPTIVE_ICON_FILE"
|
||||
echo "</adaptive-icon>" >> "$ADAPTIVE_ICON_FILE"
|
||||
|
||||
sed -i "s/package=\".*\"/package=\"$PACKAGE_NAME\"/g" \
|
||||
"$DIRNAME/AndroidManifest.xml"
|
||||
|
||||
sed -i "s/package org.supertuxkart.*/package $PACKAGE_NAME;/g" \
|
||||
"$DIRNAME/src/main/java/STKEditText.java"
|
||||
|
||||
@ -390,12 +387,6 @@ sed -i "s/package org.supertuxkart.*/package $PACKAGE_NAME;/g" \
|
||||
sed -i "s/import org.supertuxkart.*/import $PACKAGE_NAME.STKEditText;/g" \
|
||||
"$DIRNAME/src/main/java/SuperTuxKartActivity.java"
|
||||
|
||||
sed -i "s/versionName=\".*\"/versionName=\"$PROJECT_VERSION\"/g" \
|
||||
"$DIRNAME/AndroidManifest.xml"
|
||||
|
||||
sed -i "s/versionCode=\".*\"/versionCode=\"$PROJECT_CODE\"/g" \
|
||||
"$DIRNAME/AndroidManifest.xml"
|
||||
|
||||
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java" \
|
||||
"$DIRNAME/src/main/java/"
|
||||
cp -f "$DIRNAME/../lib/sdl2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java" \
|
||||
@ -454,6 +445,9 @@ export ANDROID_HOME="$SDK_PATH"
|
||||
-Pndk_version="$STK_NDK_VERSION" \
|
||||
-Pcompile_arch="$COMPILE_ARCH" \
|
||||
-Pcpu_core="$CPU_CORE" \
|
||||
-Ppackage_name="$PACKAGE_NAME" \
|
||||
-Pversion_name="$PROJECT_VERSION" \
|
||||
-Pversion_code="$PROJECT_CODE" \
|
||||
$GRADLE_BUILD_TYPE
|
||||
|
||||
if [ "$GRADLE_BUILD_TYPE" = "assembleRelease" ]; then
|
||||
@ -466,6 +460,9 @@ if [ "$GRADLE_BUILD_TYPE" = "assembleRelease" ]; then
|
||||
-Pndk_version="$STK_NDK_VERSION" \
|
||||
-Pcompile_arch="$COMPILE_ARCH" \
|
||||
-Pcpu_core="$CPU_CORE" \
|
||||
-Ppackage_name="$PACKAGE_NAME" \
|
||||
-Pversion_name="$PROJECT_VERSION" \
|
||||
-Pversion_code="$PROJECT_CODE" \
|
||||
"bundleRelease"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user