Upgrade to Android SDK 33

This commit is contained in:
Condorra 2023-08-19 20:33:29 +10:00
parent 8e2c895a24
commit 5c1896497a
4 changed files with 29 additions and 12 deletions

View File

@ -27,6 +27,7 @@ def twaManifest = [
name: 'Blastmud', // The application name. name: 'Blastmud', // The application name.
launcherName: 'Blastmud', // The name shown on the Android Launcher. launcherName: 'Blastmud', // The name shown on the Android Launcher.
themeColor: '#FFFFFF', // The color used for the status bar. themeColor: '#FFFFFF', // The color used for the status bar.
themeColorDark: '#000000', // The color used for the dark status bar.
navigationColor: '#000000', // The color used for the navigation bar. navigationColor: '#000000', // The color used for the navigation bar.
navigationColorDark: '#000000', // The color used for the dark navbar. navigationColorDark: '#000000', // The color used for the dark navbar.
navigationDividerColor: '#000000', // The navbar divider color. navigationDividerColor: '#000000', // The navbar divider color.
@ -42,7 +43,7 @@ def twaManifest = [
// The duration of fade out animation in milliseconds to be played when removing splash screen. // The duration of fade out animation in milliseconds to be played when removing splash screen.
splashScreenFadeOutDuration: 300, splashScreenFadeOutDuration: 300,
generatorApp: 'bubblewrap-cli', // Application that generated the Android Project generatorApp: 'bubblewrap-cli', // Application that generated the Android Project
// The fallback strategy for when Trusted Web Activity is not avilable. Possible values are // The fallback strategy for when Trusted Web Activity is not available. Possible values are
// 'customtabs' and 'webview'. // 'customtabs' and 'webview'.
fallbackType: 'customtabs', fallbackType: 'customtabs',
enableSiteSettingsShortcut: 'true', enableSiteSettingsShortcut: 'true',
@ -50,13 +51,13 @@ def twaManifest = [
] ]
android { android {
compileSdkVersion 31 compileSdkVersion 33
defaultConfig { defaultConfig {
applicationId "org.blastmud.game" applicationId "org.blastmud.game"
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 31 targetSdkVersion 33
versionCode 2 versionCode 6
versionName "2" versionName "5"
// The name for the application // The name for the application
resValue "string", "appName", twaManifest.name resValue "string", "appName", twaManifest.name
@ -83,7 +84,7 @@ android {
// The hostname is used when building the intent-filter, so the TWA is able to // The hostname is used when building the intent-filter, so the TWA is able to
// handle Intents to open https://svgomg.firebaseapp.com. // handle Intents to open host url of the application.
resValue "string", "hostName", twaManifest.hostName resValue "string", "hostName", twaManifest.hostName
// This attribute sets the status bar color for the TWA. It can be either set here or in // This attribute sets the status bar color for the TWA. It can be either set here or in
@ -91,6 +92,11 @@ android {
// compile. If not set, the status bar color defaults to #FFFFFF - white. // compile. If not set, the status bar color defaults to #FFFFFF - white.
resValue "color", "colorPrimary", twaManifest.themeColor resValue "color", "colorPrimary", twaManifest.themeColor
// This attribute sets the dark status bar color for the TWA. It can be either set here or in
// `res/values/colors.xml`. Setting in both places is an error and the app will not
// compile. If not set, the status bar color defaults to #000000 - white.
resValue "color", "colorPrimaryDark", twaManifest.themeColorDark
// This attribute sets the navigation bar color for the TWA. It can be either set here or // This attribute sets the navigation bar color for the TWA. It can be either set here or
// in `res/values/colors.xml`. Setting in both places is an error and the app will not // in `res/values/colors.xml`. Setting in both places is an error and the app will not
// compile. If not set, the navigation bar color defaults to #FFFFFF - white. // compile. If not set, the navigation bar color defaults to #FFFFFF - white.
@ -115,7 +121,7 @@ android {
// Trusted Web Activity. // Trusted Web Activity.
resValue "color", "backgroundColor", twaManifest.backgroundColor resValue "color", "backgroundColor", twaManifest.backgroundColor
// Defines a provider authority fot the Splash Screen // Defines a provider authority for the Splash Screen
resValue "string", "providerAuthority", twaManifest.applicationId + '.fileprovider' resValue "string", "providerAuthority", twaManifest.applicationId + '.fileprovider'
// The enableNotification resource is used to enable or disable the // The enableNotification resource is used to enable or disable the
@ -197,6 +203,6 @@ repositories {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.4.0' implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.5.0'
} }

View File

@ -23,6 +23,8 @@
package="org.blastmud.game"> package="org.blastmud.game">
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
@ -78,6 +80,10 @@
android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR" android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR"
android:resource="@color/colorPrimary" /> android:resource="@color/colorPrimary" />
<meta-data
android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR_DARK"
android:resource="@color/colorPrimaryDark" />
<meta-data <meta-data
android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR" android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR"
android:resource="@color/navigationColor" /> android:resource="@color/navigationColor" />
@ -171,5 +177,9 @@
</service> </service>
<activity android:name="com.google.androidbrowserhelper.trusted.NotificationPermissionRequestActivity" />
</application> </application>
</manifest> </manifest>

View File

@ -1 +1 @@
7adbb9681fc724319181d399947c6e78a25e7682 e2685be05360eef4c2333eec0e5964e9082d2fe9

View File

@ -5,6 +5,7 @@
"launcherName": "Blastmud", "launcherName": "Blastmud",
"display": "standalone", "display": "standalone",
"themeColor": "#FFFFFF", "themeColor": "#FFFFFF",
"themeColorDark": "#000000",
"navigationColor": "#000000", "navigationColor": "#000000",
"navigationColorDark": "#000000", "navigationColorDark": "#000000",
"navigationDividerColor": "#000000", "navigationDividerColor": "#000000",
@ -19,8 +20,8 @@
"path": "../../../android.keystore", "path": "../../../android.keystore",
"alias": "upload" "alias": "upload"
}, },
"appVersionName": "2", "appVersionName": "5",
"appVersionCode": 2, "appVersionCode": 6,
"shortcuts": [], "shortcuts": [],
"generatorApp": "bubblewrap-cli", "generatorApp": "bubblewrap-cli",
"webManifestUrl": "https://www.blastmud.org/manifest.json", "webManifestUrl": "https://www.blastmud.org/manifest.json",
@ -38,5 +39,5 @@
"fingerprints": [], "fingerprints": [],
"additionalTrustedOrigins": [], "additionalTrustedOrigins": [],
"retainedBundles": [], "retainedBundles": [],
"appVersion": "2" "appVersion": "5"
} }