[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.
|
// Define build types, which are orthogonal to product flavors.
|
||||||
buildTypes {
|
buildTypes {
|
||||||
// Signed by release key, allowing for upload to Play Store.
|
// Signed by release key, allowing for upload to Play Store.
|
||||||
|
|
@ -122,6 +125,8 @@ android {
|
||||||
signingConfigs.getByName("default")
|
signingConfigs.getByName("default")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
manifestPlaceholders += mapOf("appNameSuffix" to "")
|
||||||
|
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
isDebuggable = false
|
isDebuggable = false
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
|
|
@ -140,6 +145,9 @@ android {
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
"proguard-rules.pro"
|
"proguard-rules.pro"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
manifestPlaceholders += mapOf("appNameSuffix" to " Debug Release")
|
||||||
|
|
||||||
versionNameSuffix = "-relWithDebInfo"
|
versionNameSuffix = "-relWithDebInfo"
|
||||||
applicationIdSuffix = ".relWithDebInfo"
|
applicationIdSuffix = ".relWithDebInfo"
|
||||||
isJniDebuggable = true
|
isJniDebuggable = true
|
||||||
|
|
@ -153,13 +161,20 @@ android {
|
||||||
isJniDebuggable = true
|
isJniDebuggable = true
|
||||||
versionNameSuffix = "-debug"
|
versionNameSuffix = "-debug"
|
||||||
applicationIdSuffix = ".debug"
|
applicationIdSuffix = ".debug"
|
||||||
|
|
||||||
|
manifestPlaceholders += mapOf("appNameSuffix" to " Debug")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// appNameBase is used for the primary identifier
|
||||||
|
// this should be "Eden <flavorName>"
|
||||||
flavorDimensions.add("version")
|
flavorDimensions.add("version")
|
||||||
productFlavors {
|
productFlavors {
|
||||||
create("mainline") {
|
create("mainline") {
|
||||||
dimension = "version"
|
dimension = "version"
|
||||||
|
isDefault = true
|
||||||
|
|
||||||
|
manifestPlaceholders += mapOf("appNameBase" to "Eden")
|
||||||
resValue("string", "app_name_suffixed", "Eden")
|
resValue("string", "app_name_suffixed", "Eden")
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
|
|
@ -169,6 +184,7 @@ android {
|
||||||
|
|
||||||
create("genshinSpoof") {
|
create("genshinSpoof") {
|
||||||
dimension = "version"
|
dimension = "version"
|
||||||
|
manifestPlaceholders += mapOf("appNameBase" to "Eden Optimized")
|
||||||
resValue("string", "app_name_suffixed", "Eden Optimized")
|
resValue("string", "app_name_suffixed", "Eden Optimized")
|
||||||
applicationId = "com.miHoYo.Yuanshen"
|
applicationId = "com.miHoYo.Yuanshen"
|
||||||
|
|
||||||
|
|
@ -179,6 +195,7 @@ android {
|
||||||
|
|
||||||
create("legacy") {
|
create("legacy") {
|
||||||
dimension = "version"
|
dimension = "version"
|
||||||
|
manifestPlaceholders += mapOf("appNameBase" to "Eden Legacy")
|
||||||
resValue("string", "app_name_suffixed", "Eden Legacy")
|
resValue("string", "app_name_suffixed", "Eden Legacy")
|
||||||
applicationId = "dev.legacy.eden_emulator"
|
applicationId = "dev.legacy.eden_emulator"
|
||||||
|
|
||||||
|
|
@ -201,7 +218,8 @@ android {
|
||||||
|
|
||||||
create("chromeOS") {
|
create("chromeOS") {
|
||||||
dimension = "version"
|
dimension = "version"
|
||||||
resValue("string", "app_name_suffixed", "Eden")
|
manifestPlaceholders += mapOf("appNameBase" to "Eden ChromeOS")
|
||||||
|
resValue("string", "app_name_suffixed", "Eden ChromeOS")
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters += listOf("x86_64")
|
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 {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
version = "3.22.1"
|
version = "3.22.1"
|
||||||
|
|
@ -252,6 +245,9 @@ idea {
|
||||||
module {
|
module {
|
||||||
// Inclusion to exclude build/ dir from non-Android
|
// Inclusion to exclude build/ dir from non-Android
|
||||||
excludeDirs.add(file("${edenDir}/build"))
|
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
|
<application
|
||||||
android:name="org.yuzu.yuzu_emu.YuzuApplication"
|
android:name="org.yuzu.yuzu_emu.YuzuApplication"
|
||||||
android:label="@string/app_name_suffixed"
|
android:label="${appNameBase}${appNameSuffix}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue