diff options
Diffstat (limited to 'platform/android/java/app')
-rw-r--r-- | platform/android/java/app/AndroidManifest.xml | 16 | ||||
-rw-r--r-- | platform/android/java/app/build.gradle | 16 | ||||
-rw-r--r-- | platform/android/java/app/config.gradle | 43 | ||||
-rw-r--r-- | platform/android/java/app/gradle.properties | 25 | ||||
-rw-r--r-- | platform/android/java/app/res/drawable-nodpi/splash.png (renamed from platform/android/java/app/res/drawable/splash.png) | bin | 14766 -> 14766 bytes | |||
-rw-r--r-- | platform/android/java/app/res/drawable-nodpi/splash_bg_color.png (renamed from platform/android/java/app/res/drawable/splash_bg_color.png) | bin | 1360 -> 1360 bytes |
6 files changed, 80 insertions, 20 deletions
diff --git a/platform/android/java/app/AndroidManifest.xml b/platform/android/java/app/AndroidManifest.xml index 948fa8c00b..00e01884cf 100644 --- a/platform/android/java/app/AndroidManifest.xml +++ b/platform/android/java/app/AndroidManifest.xml @@ -19,8 +19,11 @@ <application android:label="@string/godot_project_name_string" android:allowBackup="false" - tools:ignore="GoogleAppIndexingWarning" - android:icon="@mipmap/icon" > + android:icon="@mipmap/icon" + android:isGame="true" + android:hasFragileUserData="false" + android:requestLegacyExternalStorage="false" + tools:ignore="GoogleAppIndexingWarning" > <!-- Records the version of the Godot editor used for building --> <meta-data @@ -30,11 +33,6 @@ <!-- The following metadata values are replaced when Godot exports, modifying them here has no effect. --> <!-- Do these changes in the export preset. Adding new ones is fine. --> - <!-- XR mode metadata. This is modified by the exporter based on the selected xr mode. DO NOT CHANGE the values here. --> - <meta-data - android:name="xr_mode_metadata_name" - android:value="xr_mode_metadata_value" /> - <activity android:name=".GodotApp" android:label="@string/godot_project_name_string" @@ -45,8 +43,8 @@ android:resizeableActivity="false" tools:ignore="UnusedAttribute" > - <!-- Focus awareness metadata is updated at export time if the user enables it in the 'Xr Features' section. --> - <meta-data android:name="com.oculus.vr.focusaware" android:value="false" /> + <!-- Focus awareness metadata is removed at export time if the xr mode is not VR. --> + <meta-data android:name="com.oculus.vr.focusaware" android:value="true" /> <intent-filter> <action android:name="android.intent.action.MAIN" /> diff --git a/platform/android/java/app/build.gradle b/platform/android/java/app/build.gradle index f103f22db2..18e07c3762 100644 --- a/platform/android/java/app/build.gradle +++ b/platform/android/java/app/build.gradle @@ -6,7 +6,7 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { classpath libraries.androidGradlePlugin @@ -18,9 +18,8 @@ apply plugin: 'com.android.application' allprojects { repositories { - mavenCentral() google() - jcenter() + mavenCentral() // Godot user plugins custom maven repos String[] mavenRepos = getGodotPluginsMavenRepos() @@ -113,6 +112,15 @@ android { } signingConfigs { + debug { + if (hasCustomDebugKeystore()) { + storeFile new File(getDebugKeystoreFile()) + storePassword getDebugKeystorePassword() + keyAlias getDebugKeyAlias() + keyPassword getDebugKeystorePassword() + } + } + release { File keystoreFile = new File(getReleaseKeystoreFile()) if (keystoreFile.isFile()) { @@ -157,7 +165,7 @@ android { aidl.srcDirs = ['aidl'] assets.srcDirs = ['assets'] } - debug.jniLibs.srcDirs = ['libs/debug'] + debug.jniLibs.srcDirs = ['libs/debug', 'libs/debug/vulkan_validation_layers'] release.jniLibs.srcDirs = ['libs/release'] } diff --git a/platform/android/java/app/config.gradle b/platform/android/java/app/config.gradle index c0ae4007d2..fad64c675f 100644 --- a/platform/android/java/app/config.gradle +++ b/platform/android/java/app/config.gradle @@ -1,11 +1,11 @@ ext.versions = [ - androidGradlePlugin: '4.0.1', - compileSdk : 29, - minSdk : 18, - targetSdk : 29, - buildTools : '30.0.1', + androidGradlePlugin: '4.2.2', + compileSdk : 30, + minSdk : 19, + targetSdk : 30, + buildTools : '30.0.3', supportCoreUtils : '1.0.0', - kotlinVersion : '1.4.10', + kotlinVersion : '1.5.10', v4Support : '1.0.0', javaVersion : 1.8, ndkVersion : '21.4.7075529' // Also update 'platform/android/detect.py#get_project_ndk_version()' when this is updated. @@ -191,6 +191,35 @@ ext.getGodotPluginsLocalBinaries = { -> return binDeps } +ext.getDebugKeystoreFile = { -> + String keystoreFile = project.hasProperty("debug_keystore_file") ? project.property("debug_keystore_file") : "" + if (keystoreFile == null || keystoreFile.isEmpty()) { + keystoreFile = "." + } + return keystoreFile +} + +ext.hasCustomDebugKeystore = { -> + File keystoreFile = new File(getDebugKeystoreFile()) + return keystoreFile.isFile() +} + +ext.getDebugKeystorePassword = { -> + String keystorePassword = project.hasProperty("debug_keystore_password") ? project.property("debug_keystore_password") : "" + if (keystorePassword == null || keystorePassword.isEmpty()) { + keystorePassword = "android" + } + return keystorePassword +} + +ext.getDebugKeyAlias = { -> + String keyAlias = project.hasProperty("debug_keystore_alias") ? project.property("debug_keystore_alias") : "" + if (keyAlias == null || keyAlias.isEmpty()) { + keyAlias = "androiddebugkey" + } + return keyAlias +} + ext.getReleaseKeystoreFile = { -> String keystoreFile = project.hasProperty("release_keystore_file") ? project.property("release_keystore_file") : "" if (keystoreFile == null || keystoreFile.isEmpty()) { @@ -239,5 +268,5 @@ ext.shouldSign = { -> } ext.shouldNotStrip = { -> - return isAndroidStudio() + return isAndroidStudio() || project.hasProperty("doNotStrip") } diff --git a/platform/android/java/app/gradle.properties b/platform/android/java/app/gradle.properties new file mode 100644 index 0000000000..0ad8e611ca --- /dev/null +++ b/platform/android/java/app/gradle.properties @@ -0,0 +1,25 @@ +# Godot custom build Gradle settings. +# These properties apply when running custom build from the Godot editor. +# NOTE: This should be kept in sync with 'godot/platform/android/java/gradle.properties' except +# where otherwise specified. + +# For more details on how to configure your build environment visit +# https://www.gradle.org/docs/current/userguide/build_environment.html + +android.enableJetifier=true +android.useAndroidX=true + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx4536m + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# https://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +org.gradle.warning.mode=all + +# Enable resource optimizations for release build. +# NOTE: This is turned off for template release build in order to support the build legacy process. +android.enableResourceOptimizations=true diff --git a/platform/android/java/app/res/drawable/splash.png b/platform/android/java/app/res/drawable-nodpi/splash.png Binary files differindex 7bddd4325a..7bddd4325a 100644 --- a/platform/android/java/app/res/drawable/splash.png +++ b/platform/android/java/app/res/drawable-nodpi/splash.png diff --git a/platform/android/java/app/res/drawable/splash_bg_color.png b/platform/android/java/app/res/drawable-nodpi/splash_bg_color.png Binary files differindex 004b6fd508..004b6fd508 100644 --- a/platform/android/java/app/res/drawable/splash_bg_color.png +++ b/platform/android/java/app/res/drawable-nodpi/splash_bg_color.png |