mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 14:55:28 +03:00
Only set hasFragileUserData
for signed builds
We do not want to allow saving of user data on unsigned builds as they don't have a stable signature and will not properly handle reinstallation. This can lead to a situation where the user has to resort to complex techniques to completely uninstall the package such as ADB or calling into PM directly.
This commit is contained in:
parent
3139889a09
commit
d913f29662
@ -16,6 +16,8 @@ idea.module {
|
||||
android {
|
||||
namespace 'emu.skyline'
|
||||
|
||||
var isBuildSigned = (System.getenv("CI") == "true") && (System.getenv("IS_SKYLINE_SIGNED") == "true")
|
||||
|
||||
compileSdkVersion 31
|
||||
buildToolsVersion '33.0.0'
|
||||
defaultConfig {
|
||||
@ -30,6 +32,11 @@ android {
|
||||
ndk {
|
||||
abiFilters "arm64-v8a"
|
||||
}
|
||||
|
||||
if (isBuildSigned)
|
||||
manifestPlaceholders = [shouldSaveUserData: "true"]
|
||||
else
|
||||
manifestPlaceholders = [shouldSaveUserData: "false"]
|
||||
}
|
||||
|
||||
/* JVM Bytecode Options */
|
||||
@ -63,14 +70,14 @@ android {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
signingConfig = (System.getenv("CI") == "true") && (System.getenv("IS_SKYLINE_SIGNED") == "true") ? signingConfigs.ci : signingConfigs.debug
|
||||
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
|
||||
}
|
||||
|
||||
debug {
|
||||
debuggable true
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
signingConfig = (System.getenv("CI") == "true") && (System.getenv("IS_SKYLINE_SIGNED") == "true") ? signingConfigs.ci : signingConfigs.debug
|
||||
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
android:allowBackup="true"
|
||||
android:extractNativeLibs="true"
|
||||
android:fullBackupContent="@xml/backup_descriptor"
|
||||
android:hasFragileUserData="true"
|
||||
android:hasFragileUserData="${shouldSaveUserData}"
|
||||
android:icon="@drawable/logo_skyline"
|
||||
android:isGame="true"
|
||||
android:label="@string/app_name"
|
||||
|
Loading…
Reference in New Issue
Block a user