Updated on 2026-08-14
This commit is contained in:
parent
423e125974
commit
3e5bf1d8c3
12 changed files with 505 additions and 212 deletions
|
|
@ -76,6 +76,7 @@ private fun AndroidBuildType.configureBuildVariant(extension: AppExtension, buil
|
|||
}
|
||||
BuildType.Internal,
|
||||
BuildType.External,
|
||||
BuildType.Mocked
|
||||
-> {
|
||||
initWith(extension.buildTypes.getByName(BuildType.Release.id))
|
||||
matchingFallbacks.add(BuildType.Release.id)
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ internal sealed class BuildConfigField(val type: String, val name: String, val v
|
|||
value = "\"$value\"",
|
||||
)
|
||||
|
||||
// TODO remove
|
||||
class TestActionEnabled(isEnabled: Boolean) : BuildConfigField(
|
||||
type = "Boolean",
|
||||
name = "TEST_ACTION_ENABLED",
|
||||
|
|
@ -32,4 +33,10 @@ internal sealed class BuildConfigField(val type: String, val name: String, val v
|
|||
name = "TESTER_MENU_ENABLED",
|
||||
value = isEnabled.toString(),
|
||||
)
|
||||
|
||||
class MockDataSource(isEnabled: Boolean) : BuildConfigField(
|
||||
type = "Boolean",
|
||||
name = "MOCK_DATA_SOURCE",
|
||||
value = isEnabled.toString(),
|
||||
)
|
||||
}
|
||||
|
|
@ -27,6 +27,29 @@ internal enum class BuildType(
|
|||
BuildConfigField.TestActionEnabled(isEnabled = true),
|
||||
BuildConfigField.LogEnabled(isEnabled = true),
|
||||
BuildConfigField.TesterMenuAvailability(isEnabled = true),
|
||||
BuildConfigField.MockDataSource(isEnabled = false),
|
||||
),
|
||||
),
|
||||
|
||||
/**
|
||||
* Build type for QA and business
|
||||
*
|
||||
* Features:
|
||||
* - Env: dev
|
||||
* - Signing config: debug
|
||||
* - Logs
|
||||
* - Enabled mocked datasource
|
||||
* */
|
||||
Mocked(
|
||||
id = "mocked",
|
||||
appIdSuffix = "mocked",
|
||||
versionSuffix = "mocked",
|
||||
configFields = listOf(
|
||||
BuildConfigField.Environment(value = "dev"),
|
||||
BuildConfigField.TestActionEnabled(isEnabled = false),
|
||||
BuildConfigField.LogEnabled(isEnabled = true),
|
||||
BuildConfigField.TesterMenuAvailability(isEnabled = false),
|
||||
BuildConfigField.MockDataSource(isEnabled = true),
|
||||
),
|
||||
),
|
||||
|
||||
|
|
@ -50,6 +73,7 @@ internal enum class BuildType(
|
|||
BuildConfigField.TestActionEnabled(isEnabled = true),
|
||||
BuildConfigField.LogEnabled(isEnabled = true),
|
||||
BuildConfigField.TesterMenuAvailability(isEnabled = true),
|
||||
BuildConfigField.MockDataSource(isEnabled = false),
|
||||
),
|
||||
),
|
||||
|
||||
|
|
@ -70,6 +94,7 @@ internal enum class BuildType(
|
|||
BuildConfigField.TestActionEnabled(isEnabled = false),
|
||||
BuildConfigField.LogEnabled(isEnabled = false),
|
||||
BuildConfigField.TesterMenuAvailability(isEnabled = false),
|
||||
BuildConfigField.MockDataSource(isEnabled = false),
|
||||
),
|
||||
),
|
||||
|
||||
|
|
@ -88,6 +113,7 @@ internal enum class BuildType(
|
|||
BuildConfigField.TestActionEnabled(isEnabled = false),
|
||||
BuildConfigField.LogEnabled(isEnabled = false),
|
||||
BuildConfigField.TesterMenuAvailability(isEnabled = false),
|
||||
BuildConfigField.MockDataSource(isEnabled = false),
|
||||
),
|
||||
),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue