mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Prevent file provider name collision (for debug builds)
This commit is contained in:
parent
d24e1471a7
commit
0b6da5a93c
1 changed files with 16 additions and 6 deletions
|
@ -13,13 +13,15 @@ def getCmdOutput = { cmd ->
|
||||||
def getGitHash = { -> return getCmdOutput(["git", "rev-parse", "--short", "HEAD"]) }
|
def getGitHash = { -> return getCmdOutput(["git", "rev-parse", "--short", "HEAD"]) }
|
||||||
def getGitBranch = { -> return getCmdOutput(["git", "rev-parse", "--abbrev-ref", "HEAD"]) }
|
def getGitBranch = { -> return getCmdOutput(["git", "rev-parse", "--abbrev-ref", "HEAD"]) }
|
||||||
|
|
||||||
def fileProviderAuthority = "com.beemdevelopment.aegis.fileprovider"
|
def packageName = "com.beemdevelopment.aegis"
|
||||||
|
def fileProviderAuthority = "${packageName}.fileprovider"
|
||||||
|
def fileProviderAuthorityDebug = "${packageName}.debug.fileprovider"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion 30
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.beemdevelopment.aegis"
|
applicationId "${packageName}"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 41
|
versionCode 41
|
||||||
|
@ -27,8 +29,6 @@ android {
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
|
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
|
||||||
buildConfigField "String", "GIT_BRANCH", "\"${getGitBranch()}\""
|
buildConfigField "String", "GIT_BRANCH", "\"${getGitBranch()}\""
|
||||||
buildConfigField("String", "FILE_PROVIDER_AUTHORITY", "\"${fileProviderAuthority}\"")
|
|
||||||
manifestPlaceholders = [fileProviderAuthority: "${fileProviderAuthority}"]
|
|
||||||
|
|
||||||
testInstrumentationRunner "com.beemdevelopment.aegis.AegisTestRunner"
|
testInstrumentationRunner "com.beemdevelopment.aegis.AegisTestRunner"
|
||||||
testInstrumentationRunnerArguments clearPackageData: 'true'
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
||||||
|
@ -55,7 +55,12 @@ android {
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
manifestPlaceholders = [title: "AegisDev", iconName: "ic_launcher_debug"]
|
manifestPlaceholders = [
|
||||||
|
title: "AegisDev",
|
||||||
|
iconName: "ic_launcher_debug",
|
||||||
|
fileProviderAuthority: "${fileProviderAuthorityDebug}"
|
||||||
|
]
|
||||||
|
buildConfigField("String", "FILE_PROVIDER_AUTHORITY", "\"${fileProviderAuthorityDebug}\"")
|
||||||
resValue "bool", "pref_secure_screen_default", "false"
|
resValue "bool", "pref_secure_screen_default", "false"
|
||||||
postprocessing {
|
postprocessing {
|
||||||
removeUnusedCode true
|
removeUnusedCode true
|
||||||
|
@ -66,7 +71,12 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
manifestPlaceholders = [title: "Aegis", iconName: "ic_launcher"]
|
manifestPlaceholders = [
|
||||||
|
title: "Aegis",
|
||||||
|
iconName: "ic_launcher",
|
||||||
|
fileProviderAuthority: "${fileProviderAuthority}"
|
||||||
|
]
|
||||||
|
buildConfigField("String", "FILE_PROVIDER_AUTHORITY", "\"${fileProviderAuthority}\"")
|
||||||
resValue "bool", "pref_secure_screen_default", "true"
|
resValue "bool", "pref_secure_screen_default", "true"
|
||||||
postprocessing {
|
postprocessing {
|
||||||
removeUnusedCode true
|
removeUnusedCode true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue