Updated on 2026-08-14
This commit is contained in:
parent
1f9aa7aca8
commit
5ecc4c6775
8 changed files with 6 additions and 94 deletions
|
|
@ -69,25 +69,17 @@ private fun AppExtension.configureBuildTypes() {
|
|||
|
||||
private fun AndroidBuildType.configureBuildVariant(appExtension: AppExtension, buildType: BuildType) {
|
||||
when (buildType) {
|
||||
BuildType.Release -> {
|
||||
isDebuggable = false
|
||||
}
|
||||
BuildType.Debug -> {
|
||||
isDebuggable = true
|
||||
}
|
||||
BuildType.DebugPG -> {
|
||||
// build is not debuggable to let R8 make optimizations
|
||||
// otherwise, only shrinking will be applied
|
||||
matchingFallbacks.add(BuildType.Debug.id)
|
||||
signingConfig = appExtension.signingConfigs.getByName(BuildType.Debug.id)
|
||||
}
|
||||
BuildType.Internal,
|
||||
BuildType.External,
|
||||
-> {
|
||||
BuildType.Internal -> {
|
||||
initWith(appExtension.buildTypes.getByName(BuildType.Release.id))
|
||||
matchingFallbacks.add(BuildType.Release.id)
|
||||
signingConfig = appExtension.signingConfigs.getByName(BuildType.Debug.id)
|
||||
}
|
||||
BuildType.Release -> {
|
||||
isDebuggable = false
|
||||
}
|
||||
BuildType.Mocked -> {
|
||||
initWith(appExtension.buildTypes.getByName(BuildType.Release.id))
|
||||
matchingFallbacks.add(BuildType.Release.id)
|
||||
|
|
|
|||
|
|
@ -32,19 +32,6 @@ internal enum class BuildType(
|
|||
),
|
||||
),
|
||||
|
||||
DebugPG(
|
||||
id = "debugPG",
|
||||
appIdSuffix = "debug",
|
||||
obfuscating = true,
|
||||
configFields = listOf(
|
||||
BuildConfigField.Environment(value = "dev"),
|
||||
BuildConfigField.TestActionEnabled(isEnabled = true),
|
||||
BuildConfigField.LogEnabled(isEnabled = true),
|
||||
BuildConfigField.TesterMenuAvailability(isEnabled = true),
|
||||
BuildConfigField.MockDataSource(isEnabled = false),
|
||||
),
|
||||
),
|
||||
|
||||
/**
|
||||
* Build type for QA and business
|
||||
*
|
||||
|
|
@ -91,27 +78,6 @@ internal enum class BuildType(
|
|||
),
|
||||
),
|
||||
|
||||
/**
|
||||
* Build type for QA and business
|
||||
*
|
||||
* Features:
|
||||
* - Env: prod
|
||||
* - Signing config: debug
|
||||
* - Proguard
|
||||
* */
|
||||
External(
|
||||
id = "external",
|
||||
appIdSuffix = "external",
|
||||
versionSuffix = "external",
|
||||
configFields = listOf(
|
||||
BuildConfigField.Environment(value = "prod"),
|
||||
BuildConfigField.TestActionEnabled(isEnabled = false),
|
||||
BuildConfigField.LogEnabled(isEnabled = false),
|
||||
BuildConfigField.TesterMenuAvailability(isEnabled = false),
|
||||
BuildConfigField.MockDataSource(isEnabled = false),
|
||||
),
|
||||
),
|
||||
|
||||
/**
|
||||
* Production ready build type for clients
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue