[android] exclude cpm cache from index, set default to mainline (#3340)
Your radioactive computers get beat by an intel i5-2540M on a 5400RPM hard drive that exploded in my sleep btw Also sets mainline to default and gets rid of the horrific naming logic I had before. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3340 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: DraVee <dravee@eden-emu.dev>
This commit is contained in:
parent
651585963a
commit
872e03c9a6
|
|
@ -112,6 +112,9 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
// The app name is constructed with the appNameSuffix and appNameBase manifest placeholders
|
||||
// suffix is used for build type--remember to include a space beforehand
|
||||
|
||||
// Define build types, which are orthogonal to product flavors.
|
||||
buildTypes {
|
||||
// Signed by release key, allowing for upload to Play Store.
|
||||
|
|
@ -122,6 +125,8 @@ android {
|
|||
signingConfigs.getByName("default")
|
||||
}
|
||||
|
||||
manifestPlaceholders += mapOf("appNameSuffix" to "")
|
||||
|
||||
isMinifyEnabled = true
|
||||
isDebuggable = false
|
||||
proguardFiles(
|
||||
|
|
@ -140,6 +145,9 @@ android {
|
|||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
|
||||
manifestPlaceholders += mapOf("appNameSuffix" to " Debug Release")
|
||||
|
||||
versionNameSuffix = "-relWithDebInfo"
|
||||
applicationIdSuffix = ".relWithDebInfo"
|
||||
isJniDebuggable = true
|
||||
|
|
@ -153,13 +161,20 @@ android {
|
|||
isJniDebuggable = true
|
||||
versionNameSuffix = "-debug"
|
||||
applicationIdSuffix = ".debug"
|
||||
|
||||
manifestPlaceholders += mapOf("appNameSuffix" to " Debug")
|
||||
}
|
||||
}
|
||||
|
||||
// appNameBase is used for the primary identifier
|
||||
// this should be "Eden <flavorName>"
|
||||
flavorDimensions.add("version")
|
||||
productFlavors {
|
||||
create("mainline") {
|
||||
dimension = "version"
|
||||
isDefault = true
|
||||
|
||||
manifestPlaceholders += mapOf("appNameBase" to "Eden")
|
||||
resValue("string", "app_name_suffixed", "Eden")
|
||||
|
||||
ndk {
|
||||
|
|
@ -169,6 +184,7 @@ android {
|
|||
|
||||
create("genshinSpoof") {
|
||||
dimension = "version"
|
||||
manifestPlaceholders += mapOf("appNameBase" to "Eden Optimized")
|
||||
resValue("string", "app_name_suffixed", "Eden Optimized")
|
||||
applicationId = "com.miHoYo.Yuanshen"
|
||||
|
||||
|
|
@ -179,6 +195,7 @@ android {
|
|||
|
||||
create("legacy") {
|
||||
dimension = "version"
|
||||
manifestPlaceholders += mapOf("appNameBase" to "Eden Legacy")
|
||||
resValue("string", "app_name_suffixed", "Eden Legacy")
|
||||
applicationId = "dev.legacy.eden_emulator"
|
||||
|
||||
|
|
@ -201,7 +218,8 @@ android {
|
|||
|
||||
create("chromeOS") {
|
||||
dimension = "version"
|
||||
resValue("string", "app_name_suffixed", "Eden")
|
||||
manifestPlaceholders += mapOf("appNameBase" to "Eden ChromeOS")
|
||||
resValue("string", "app_name_suffixed", "Eden ChromeOS")
|
||||
|
||||
ndk {
|
||||
abiFilters += listOf("x86_64")
|
||||
|
|
@ -215,31 +233,6 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
// this is really annoying but idk any other ways to fix this behavior
|
||||
applicationVariants.all {
|
||||
val variant = this
|
||||
when {
|
||||
variant.flavorName == "legacy" && variant.buildType.name == "debug" -> {
|
||||
variant.resValue("string", "app_name_suffixed", "Eden Legacy Debug")
|
||||
}
|
||||
variant.flavorName == "mainline" && variant.buildType.name == "debug" -> {
|
||||
variant.resValue("string", "app_name_suffixed", "Eden Debug")
|
||||
}
|
||||
variant.flavorName == "genshinSpoof" && variant.buildType.name == "debug" -> {
|
||||
variant.resValue("string", "app_name_suffixed", "Eden Optimized Debug")
|
||||
}
|
||||
variant.flavorName == "legacy" && variant.buildType.name == "relWithDebInfo" -> {
|
||||
variant.resValue("string", "app_name_suffixed", "Eden Legacy Debug Release")
|
||||
}
|
||||
variant.flavorName == "mainline" && variant.buildType.name == "relWithDebInfo" -> {
|
||||
variant.resValue("string", "app_name_suffixed", "Eden Debug Release")
|
||||
}
|
||||
variant.flavorName == "genshinSpoof" && variant.buildType.name == "relWithDebInfo" -> {
|
||||
variant.resValue("string", "app_name_suffixed", "Eden Optimized Debug Release")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
version = "3.22.1"
|
||||
|
|
@ -252,6 +245,9 @@ idea {
|
|||
module {
|
||||
// Inclusion to exclude build/ dir from non-Android
|
||||
excludeDirs.add(file("${edenDir}/build"))
|
||||
|
||||
// also exclude CPM cache from automatic indexing
|
||||
excludeDirs.add(file("${edenDir}/.cache"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||
|
||||
<application
|
||||
android:name="org.yuzu.yuzu_emu.YuzuApplication"
|
||||
android:label="@string/app_name_suffixed"
|
||||
android:label="${appNameBase}${appNameSuffix}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:allowBackup="true"
|
||||
|
|
|
|||
Loading…
Reference in New Issue