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

View File

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