feat(build): distinguish debug builds in ID, version, name
Signed-off-by: Infi <wingit@geist.ga>
This commit is contained in:
parent
97d5f367d1
commit
8fdf442747
|
|
@ -43,6 +43,11 @@ def property(String fileName, String propertyName, String fallbackEnv = null) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calls property but with revoltbuild.properties as the first argument
|
||||||
|
def buildproperty(String propertyName, String fallbackEnv = null) {
|
||||||
|
return property('revoltbuild.properties', propertyName, fallbackEnv)
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk 34
|
compileSdk 34
|
||||||
|
|
||||||
|
|
@ -66,17 +71,21 @@ android {
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
buildConfigField "String", "SENTRY_DSN", "\"${property('revoltbuild.properties', 'sentry.dsn', 'RVX_SENTRY_DSN')}\""
|
buildConfigField "String", "SENTRY_DSN", "\"${buildproperty('sentry.dsn', 'RVX_SENTRY_DSN')}\""
|
||||||
buildConfigField "Boolean", "ANALYSIS_ENABLED", "${property('revoltbuild.properties', 'analysis.enabled', 'RVX_ANALYSIS_ENABLED')}"
|
buildConfigField "Boolean", "ANALYSIS_ENABLED", "${buildproperty('analysis.enabled', 'RVX_ANALYSIS_ENABLED')}"
|
||||||
buildConfigField "String", "ANALYSIS_BASEURL", "\"${property('revoltbuild.properties', 'analysis.base_url', 'RVX_ANALYSIS_BASEURL')}\""
|
buildConfigField "String", "ANALYSIS_BASEURL", "\"${buildproperty('analysis.base_url', 'RVX_ANALYSIS_BASEURL')}\""
|
||||||
}
|
}
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
buildConfigField "String", "SENTRY_DSN", "\"${property('revoltbuild.properties', 'sentry.dsn', 'RVX_SENTRY_DSN')}\""
|
|
||||||
buildConfigField "Boolean", "ANALYSIS_ENABLED", "${property('revoltbuild.properties', 'analysis.enabled', 'RVX_ANALYSIS_ENABLED')}"
|
|
||||||
buildConfigField "String", "ANALYSIS_BASEURL", "\"${property('revoltbuild.properties', 'analysis.base_url', 'RVX_ANALYSIS_BASEURL')}\""
|
|
||||||
|
|
||||||
pseudoLocalesEnabled true
|
pseudoLocalesEnabled true
|
||||||
|
|
||||||
|
applicationIdSuffix ".debug"
|
||||||
|
versionNameSuffix '+debug'
|
||||||
|
resValue "string", "app_name", buildproperty('build.debug.app_name', 'RVX_DEBUG_APP_NAME')
|
||||||
|
|
||||||
|
buildConfigField "String", "SENTRY_DSN", "\"${buildproperty('sentry.dsn', 'RVX_SENTRY_DSN')}\""
|
||||||
|
buildConfigField "Boolean", "ANALYSIS_ENABLED", "${buildproperty('analysis.enabled', 'RVX_ANALYSIS_ENABLED')}"
|
||||||
|
buildConfigField "String", "ANALYSIS_BASEURL", "\"${buildproperty('analysis.base_url', 'RVX_ANALYSIS_BASEURL')}\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
|
@ -107,7 +116,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
sentry {
|
sentry {
|
||||||
autoUploadProguardMapping = property('revoltbuild.properties', 'sentry.upload_mappings', 'RVX_SENTRY_UPLOAD_MAPPINGS') == 'true'
|
autoUploadProguardMapping = buildproperty('sentry.upload_mappings', 'RVX_SENTRY_UPLOAD_MAPPINGS') == 'true'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
sentry.dsn=
|
sentry.dsn=
|
||||||
sentry.upload_mappings=true
|
sentry.upload_mappings=true
|
||||||
analysis.enabled=false
|
analysis.enabled=false
|
||||||
analysis.base_url=
|
analysis.base_url=
|
||||||
|
build.debug.app_name=
|
||||||
Loading…
Reference in New Issue