Updated on 2026-08-14
This commit is contained in:
parent
cc66f03895
commit
097a377af3
4 changed files with 31 additions and 15 deletions
|
|
@ -3,11 +3,7 @@ apply plugin: 'kotlin-android'
|
|||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
|
||||
ext.configVar = [
|
||||
configEnvironment: "CONFIG_ENVIRONMENT",
|
||||
testActionEnabled: "TEST_ACTION_ENABLED",
|
||||
]
|
||||
apply from: '../dependencies.gradle'
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
|
|
@ -19,7 +15,8 @@ android {
|
|||
targetSdkVersion 31
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
buildConfigField 'Boolean', configVar.testActionEnabled, 'false'
|
||||
buildConfigField 'Boolean', environmentConfig.testActionEnabled, 'false'
|
||||
buildConfigField 'Boolean', environmentConfig.logEnabled, 'false'
|
||||
}
|
||||
buildFeatures {
|
||||
compose true
|
||||
|
|
@ -31,8 +28,9 @@ android {
|
|||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.debug
|
||||
buildConfigField 'String', configVar.configEnvironment, '\"prod\"'
|
||||
buildConfigField 'Boolean', configVar.testActionEnabled, 'false'
|
||||
buildConfigField 'String', environmentConfig.environment, '\"prod\"'
|
||||
buildConfigField 'Boolean', environmentConfig.testActionEnabled, 'false'
|
||||
buildConfigField 'Boolean', environmentConfig.logEnabled, 'false'
|
||||
}
|
||||
debug {
|
||||
debuggable true
|
||||
|
|
@ -42,16 +40,18 @@ android {
|
|||
firebaseCrashlytics {
|
||||
mappingFileUploadEnabled false
|
||||
}
|
||||
buildConfigField 'String', configVar.configEnvironment, '\"dev\"'
|
||||
buildConfigField 'Boolean', configVar.testActionEnabled, 'true'
|
||||
buildConfigField 'String', environmentConfig.environment, '\"dev\"'
|
||||
buildConfigField 'Boolean', environmentConfig.testActionEnabled, 'true'
|
||||
buildConfigField 'Boolean', environmentConfig.logEnabled, 'true'
|
||||
}
|
||||
debug_beta {
|
||||
initWith release
|
||||
debuggable false
|
||||
versionNameSuffix "-beta"
|
||||
applicationIdSuffix ".debug"
|
||||
buildConfigField 'String', configVar.configEnvironment, '\"prod\"'
|
||||
buildConfigField 'Boolean', configVar.testActionEnabled, 'false'
|
||||
buildConfigField 'String', environmentConfig.environment, '\"prod\"'
|
||||
buildConfigField 'Boolean', environmentConfig.testActionEnabled, 'false'
|
||||
buildConfigField 'Boolean', environmentConfig.logEnabled, 'false'
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ interface Loader<T> {
|
|||
fun load(onComplete: (T) -> Unit)
|
||||
|
||||
companion object {
|
||||
const val featuresName = "features_${BuildConfig.CONFIG_ENVIRONMENT}"
|
||||
const val configValuesName = "tangem-app-config/config_${BuildConfig.CONFIG_ENVIRONMENT}"
|
||||
const val warnings = "warnings_${BuildConfig.CONFIG_ENVIRONMENT}"
|
||||
const val featuresName = "features_${BuildConfig.ENVIRONMENT}"
|
||||
const val configValuesName = "tangem-app-config/config_${BuildConfig.ENVIRONMENT}"
|
||||
const val warnings = "warnings_${BuildConfig.ENVIRONMENT}"
|
||||
}
|
||||
}
|
||||
|
|
@ -2,3 +2,9 @@ ext.versions = [
|
|||
kotlin : '1.6.10',
|
||||
build_gradle: '7.1.3',
|
||||
]
|
||||
|
||||
ext.environmentConfig = [
|
||||
environment: "ENVIRONMENT",
|
||||
testActionEnabled: "TEST_ACTION_ENABLED",
|
||||
logEnabled : "LOG_ENABLED",
|
||||
]
|
||||
|
|
@ -3,6 +3,8 @@ plugins {
|
|||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
|
||||
apply from: '../dependencies.gradle'
|
||||
|
||||
android {
|
||||
compileSdk 31
|
||||
|
||||
|
|
@ -12,6 +14,8 @@ android {
|
|||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
buildConfigField 'Boolean', environmentConfig.testActionEnabled, 'false'
|
||||
buildConfigField 'Boolean', environmentConfig.logEnabled, 'false'
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
|
@ -19,13 +23,19 @@ android {
|
|||
debuggable false
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
buildConfigField 'Boolean', environmentConfig.testActionEnabled, 'false'
|
||||
buildConfigField 'Boolean', environmentConfig.logEnabled, 'false'
|
||||
}
|
||||
debug {
|
||||
debuggable true
|
||||
minifyEnabled false
|
||||
buildConfigField 'Boolean', environmentConfig.testActionEnabled, 'true'
|
||||
buildConfigField 'Boolean', environmentConfig.logEnabled, 'true'
|
||||
}
|
||||
debug_beta {
|
||||
initWith release
|
||||
buildConfigField 'Boolean', environmentConfig.testActionEnabled, 'true'
|
||||
buildConfigField 'Boolean', environmentConfig.logEnabled, 'true'
|
||||
}
|
||||
}
|
||||
kotlinOptions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue