Run emulation in a separate process for release builds only

This commit is contained in:
lynxnb 2022-12-21 13:20:44 +01:00 committed by PixelyIon
parent 950438bf58
commit 2a421e7146
2 changed files with 9 additions and 5 deletions

View File

@ -34,9 +34,12 @@ android {
}
if (isBuildSigned)
manifestPlaceholders = [shouldSaveUserData: "true"]
manifestPlaceholders += [shouldSaveUserData: "true"]
else
manifestPlaceholders = [shouldSaveUserData: "false"]
manifestPlaceholders += [shouldSaveUserData: "false"]
// Only enable separate process for release builds
manifestPlaceholders += [emulationProcess: ""]
}
/* JVM Bytecode Options */
@ -71,6 +74,7 @@ android {
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
manifestPlaceholders += [emulationProcess: ":emulationProcess"]
}
reldebug {
@ -97,14 +101,14 @@ android {
productFlavors {
full {
dimension = "version"
manifestPlaceholders = [appLabel: "Skyline"]
manifestPlaceholders += [appLabel: "Skyline"]
}
dev {
dimension = "version"
applicationIdSuffix = ".dev"
versionNameSuffix = "-dev"
manifestPlaceholders = [appLabel: "Skyline Dev"]
manifestPlaceholders += [appLabel: "Skyline Dev"]
}
}

View File

@ -68,7 +68,7 @@
android:configChanges="orientation|screenSize|uiMode"
android:exported="true"
android:launchMode="singleTask"
android:process=":emulationProcess"
android:process="${emulationProcess}"
android:parentActivityName=".MainActivity">
<intent-filter>