0
0
mirror of https://github.com/thunderbird/thunderbird-android.git synced 2024-09-19 19:52:14 +02:00
thunderbird-android/app-thunderbird/build.gradle.kts

211 lines
5.7 KiB
Plaintext
Raw Permalink Normal View History

2024-01-23 11:51:53 +01:00
plugins {
id(ThunderbirdPlugins.App.androidCompose)
alias(libs.plugins.dependency.guard)
id("thunderbird.quality.badging")
}
val testCoverageEnabled: Boolean by extra
if (testCoverageEnabled) {
apply(plugin = "jacoco")
}
android {
namespace = "net.thunderbird.android"
defaultConfig {
applicationId = "net.thunderbird.android"
testApplicationId = "net.thunderbird.android.tests"
2024-01-23 11:51:53 +01:00
2024-07-24 16:07:12 +02:00
versionCode = 2
2024-07-23 12:12:33 +02:00
versionName = "0.1"
2024-01-23 11:51:53 +01:00
// Keep in sync with the resource string array "supported_languages"
resourceConfigurations.addAll(
listOf(
"ar",
"be",
"bg",
"br",
"ca",
2024-06-06 15:16:52 +02:00
"co",
2024-01-23 11:51:53 +01:00
"cs",
"cy",
"da",
"de",
"el",
"en",
"en_GB",
"eo",
"es",
"et",
"eu",
"fa",
"fi",
"fr",
"fy",
"gd",
"gl",
"hr",
"hu",
"in",
"is",
"it",
"iw",
"ja",
"ko",
2024-01-23 11:51:53 +01:00
"lt",
"lv",
"ml",
"nb",
"nl",
"pl",
"pt_BR",
"pt_PT",
"ro",
"ru",
"sk",
"sl",
"sq",
"sr",
"sv",
"tr",
"uk",
"vi",
2024-01-23 11:51:53 +01:00
"zh_CN",
"zh_TW",
),
)
buildConfigField("String", "CLIENT_INFO_APP_NAME", "\"Thunderbird\"")
2024-01-23 11:51:53 +01:00
}
signingConfigs {
val useUploadKey = properties.getOrDefault("tb.useUploadKey", "true") == "true"
createSigningConfig(project, SigningType.TB_RELEASE, isUpload = useUploadKey)
createSigningConfig(project, SigningType.TB_BETA, isUpload = useUploadKey)
createSigningConfig(project, SigningType.TB_DAILY, isUpload = useUploadKey)
2024-01-23 11:51:53 +01:00
}
buildTypes {
debug {
applicationIdSuffix = ".debug"
2024-07-23 12:12:33 +02:00
versionNameSuffix = "-SNAPSHOT"
2024-01-23 11:51:53 +01:00
isMinifyEnabled = false
2024-07-24 16:07:12 +02:00
isShrinkResources = false
isDebuggable = true
buildConfigField("String", "GLEAN_RELEASE_CHANNEL", "null")
2024-01-23 11:51:53 +01:00
}
release {
2024-07-23 14:04:49 +02:00
signingConfig = signingConfigs.getByType(SigningType.TB_RELEASE)
2024-07-23 11:56:14 +02:00
2024-01-23 11:51:53 +01:00
isMinifyEnabled = true
isShrinkResources = true
2024-07-24 16:07:12 +02:00
isDebuggable = false
2024-07-23 11:56:14 +02:00
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro",
)
buildConfigField("String", "GLEAN_RELEASE_CHANNEL", "\"release\"")
2024-01-23 11:51:53 +01:00
}
2024-07-23 14:04:49 +02:00
create("beta") {
signingConfig = signingConfigs.getByType(SigningType.TB_BETA)
applicationIdSuffix = ".beta"
versionNameSuffix = "b1"
2024-07-23 12:12:33 +02:00
2024-07-24 16:07:12 +02:00
isMinifyEnabled = true
isShrinkResources = true
isDebuggable = false
2024-01-23 11:51:53 +01:00
matchingFallbacks += listOf("release")
2024-07-24 16:07:12 +02:00
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro",
)
buildConfigField("String", "GLEAN_RELEASE_CHANNEL", "\"beta\"")
2024-01-23 11:51:53 +01:00
}
2024-07-23 14:04:49 +02:00
create("daily") {
signingConfig = signingConfigs.getByType(SigningType.TB_DAILY)
applicationIdSuffix = ".daily"
versionNameSuffix = "a1"
2024-07-23 12:12:33 +02:00
2024-07-24 16:07:12 +02:00
isMinifyEnabled = true
isShrinkResources = true
isDebuggable = false
2024-01-23 11:51:53 +01:00
matchingFallbacks += listOf("release")
2024-07-24 16:07:12 +02:00
proguardFiles(
getDefaultProguardFile("proguard-android.txt"),
"proguard-rules.pro",
)
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1918151
buildConfigField("String", "GLEAN_RELEASE_CHANNEL", "\"nightly\"")
2024-01-23 11:51:53 +01:00
}
}
packaging {
jniLibs {
excludes += listOf("kotlin/**")
}
resources {
excludes += listOf(
"META-INF/*.kotlin_module",
"META-INF/*.version",
"kotlin/**",
"DebugProbesKt.bin",
)
}
}
}
dependencies {
implementation(projects.appCommon)
implementation(projects.core.ui.compose.theme2.thunderbird)
implementation(projects.core.ui.legacy.theme2.thunderbird)
implementation(projects.feature.launcher)
implementation(projects.legacy.core)
implementation(projects.legacy.ui.legacy)
implementation(projects.core.featureflags)
implementation(projects.feature.widget.messageList)
implementation(projects.feature.widget.shortcut)
implementation(projects.feature.widget.unread)
2024-09-10 16:19:39 +02:00
debugImplementation(projects.feature.telemetry.noop)
releaseImplementation(projects.feature.telemetry.glean)
"betaImplementation"(projects.feature.telemetry.glean)
"dailyImplementation"(projects.feature.telemetry.glean)
implementation(libs.androidx.work.runtime)
implementation(projects.feature.autodiscovery.api)
debugImplementation(projects.backend.demo)
debugImplementation(projects.feature.autodiscovery.demo)
testImplementation(libs.robolectric)
// Required for DependencyInjectionTest to be able to resolve OpenPgpApiManager
testImplementation(projects.plugins.openpgpApiLib.openpgpApi)
testImplementation(projects.feature.account.setup)
}
2024-01-23 11:51:53 +01:00
dependencyGuard {
configuration("releaseRuntimeClasspath")
}