From 2289f7ad1536cdb44ae02c25d1c6ed85d7567e2e Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Sat, 13 May 2023 12:39:28 -0400 Subject: android: Fix issues with ea/main icons and version codes Now all yuzu icon variants are taken care of and now we have a build variant that uses the versioning we need for the play store. --- src/android/app/build.gradle.kts | 25 ++++++++++++++++------ .../app/src/ea/res/drawable/ic_launcher.xml | 6 ------ src/android/app/src/ea/res/drawable/ic_yuzu.xml | 22 +++++++++++++++++++ .../app/src/ea/res/drawable/ic_yuzu_full.xml | 12 +++++++++++ .../app/src/ea/res/drawable/ic_yuzu_title.xml | 24 +++++++++++++++++++++ .../org/yuzu/yuzu_emu/fragments/AboutFragment.kt | 9 -------- .../yuzu_emu/fragments/HomeSettingsFragment.kt | 7 ------ .../app/src/main/res/drawable/ic_yuzu_ea.xml | 22 ------------------- .../app/src/main/res/drawable/ic_yuzu_ea_full.xml | 12 ----------- .../app/src/main/res/drawable/ic_yuzu_ea_title.xml | 24 --------------------- 10 files changed, 77 insertions(+), 86 deletions(-) delete mode 100644 src/android/app/src/ea/res/drawable/ic_launcher.xml create mode 100644 src/android/app/src/ea/res/drawable/ic_yuzu.xml create mode 100644 src/android/app/src/ea/res/drawable/ic_yuzu_full.xml create mode 100644 src/android/app/src/ea/res/drawable/ic_yuzu_title.xml delete mode 100644 src/android/app/src/main/res/drawable/ic_yuzu_ea.xml delete mode 100644 src/android/app/src/main/res/drawable/ic_yuzu_ea_full.xml delete mode 100644 src/android/app/src/main/res/drawable/ic_yuzu_ea_title.xml diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index 8c970609f..f0a4dbd5a 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -48,7 +48,6 @@ android { applicationId = "org.yuzu.yuzu_emu" minSdk = 30 targetSdk = 33 - versionCode = 1 versionName = getVersion() ndk { @@ -85,26 +84,39 @@ android { getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" ) + defaultConfig.versionCode = 1 + } + + register("relWithVersionCode") { + signingConfig = signingConfigs.getByName("debug") + isMinifyEnabled = true + isDebuggable = false + proguardFiles( + getDefaultProguardFile("proguard-android.txt"), + "proguard-rules.pro" + ) + defaultConfig.versionCode = autoVersion } // builds a release build that doesn't need signing // Attaches 'debug' suffix to version and package name, allowing installation alongside the release build. register("relWithDebInfo") { - initWith(getByName("release")) - versionNameSuffix = "-debug" signingConfig = signingConfigs.getByName("debug") - enableAndroidTestCoverage = false + isMinifyEnabled = true isDebuggable = true + versionNameSuffix = "-debug" + enableAndroidTestCoverage = false isJniDebuggable = true + defaultConfig.versionCode = 1 } // Signed by debug key disallowing distribution on Play Store. // Attaches 'debug' suffix to version and package name, allowing installation alongside the release build. debug { - // TODO If this is ever modified, change application_id in debug/strings.xml - versionNameSuffix = "-debug" isDebuggable = true isJniDebuggable = true + versionNameSuffix = "-debug" + defaultConfig.versionCode = 1 } } @@ -118,6 +130,7 @@ android { create("ea") { dimension = "version" buildConfigField("Boolean", "PREMIUM", "true") + applicationIdSuffix = ".ea" } } diff --git a/src/android/app/src/ea/res/drawable/ic_launcher.xml b/src/android/app/src/ea/res/drawable/ic_launcher.xml deleted file mode 100644 index 9d074c347..000000000 --- a/src/android/app/src/ea/res/drawable/ic_launcher.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/android/app/src/ea/res/drawable/ic_yuzu.xml b/src/android/app/src/ea/res/drawable/ic_yuzu.xml new file mode 100644 index 000000000..deb8ba53f --- /dev/null +++ b/src/android/app/src/ea/res/drawable/ic_yuzu.xml @@ -0,0 +1,22 @@ + + + + diff --git a/src/android/app/src/ea/res/drawable/ic_yuzu_full.xml b/src/android/app/src/ea/res/drawable/ic_yuzu_full.xml new file mode 100644 index 000000000..4ef472876 --- /dev/null +++ b/src/android/app/src/ea/res/drawable/ic_yuzu_full.xml @@ -0,0 +1,12 @@ + + + + diff --git a/src/android/app/src/ea/res/drawable/ic_yuzu_title.xml b/src/android/app/src/ea/res/drawable/ic_yuzu_title.xml new file mode 100644 index 000000000..29d0cfced --- /dev/null +++ b/src/android/app/src/ea/res/drawable/ic_yuzu_title.xml @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt index c2e0b9615..0314feff6 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt @@ -88,15 +88,6 @@ class AboutFragment : Fragment() { binding.buttonWebsite.setOnClickListener { openLink(getString(R.string.website_link)) } binding.buttonGithub.setOnClickListener { openLink(getString(R.string.github_link)) } - if (BuildConfig.PREMIUM) { - binding.imageLogo.setImageDrawable( - ContextCompat.getDrawable( - requireContext(), - R.drawable.ic_yuzu_ea_title - ) - ) - } - setInsets() } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt index 09628634d..3a334a74c 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt @@ -127,13 +127,6 @@ class HomeSettingsFragment : Fragment() { ?.navigate(R.id.action_homeSettingsFragment_to_earlyAccessFragment) } ) - } else { - binding.logoImage.setImageDrawable( - ContextCompat.getDrawable( - requireContext(), - R.drawable.ic_yuzu_ea_full - ) - ) } binding.homeSettingsList.apply { diff --git a/src/android/app/src/main/res/drawable/ic_yuzu_ea.xml b/src/android/app/src/main/res/drawable/ic_yuzu_ea.xml deleted file mode 100644 index deb8ba53f..000000000 --- a/src/android/app/src/main/res/drawable/ic_yuzu_ea.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - diff --git a/src/android/app/src/main/res/drawable/ic_yuzu_ea_full.xml b/src/android/app/src/main/res/drawable/ic_yuzu_ea_full.xml deleted file mode 100644 index 4ef472876..000000000 --- a/src/android/app/src/main/res/drawable/ic_yuzu_ea_full.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/src/android/app/src/main/res/drawable/ic_yuzu_ea_title.xml b/src/android/app/src/main/res/drawable/ic_yuzu_ea_title.xml deleted file mode 100644 index 29d0cfced..000000000 --- a/src/android/app/src/main/res/drawable/ic_yuzu_ea_title.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - -- cgit v1.2.3