2023-01-08 02:14:00 +00:00
|
|
|
plugins {
|
2023-02-23 10:13:01 +00:00
|
|
|
id(ThunderbirdPlugins.App.android)
|
2023-01-08 02:14:00 +00:00
|
|
|
}
|
2014-12-19 22:05:58 +00:00
|
|
|
|
2023-02-23 10:13:01 +00:00
|
|
|
val testCoverageEnabled: Boolean by extra
|
|
|
|
if (testCoverageEnabled) {
|
|
|
|
apply(plugin = "jacoco")
|
2014-12-19 22:05:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2023-02-23 10:13:01 +00:00
|
|
|
implementation(projects.app.ui.legacy)
|
|
|
|
implementation(projects.app.ui.messageListWidget)
|
|
|
|
implementation(projects.app.core)
|
|
|
|
implementation(projects.app.storage)
|
|
|
|
implementation(projects.app.cryptoOpenpgp)
|
|
|
|
implementation(projects.backend.imap)
|
|
|
|
implementation(projects.backend.pop3)
|
|
|
|
debugImplementation(projects.backend.demo)
|
|
|
|
|
2023-06-30 12:50:00 +00:00
|
|
|
implementation(projects.core.featureflags)
|
2023-06-29 11:00:42 +00:00
|
|
|
implementation(projects.feature.launcher)
|
|
|
|
|
|
|
|
// TODO remove account setup dependency
|
2023-06-27 16:06:29 +00:00
|
|
|
implementation(projects.feature.account.setup)
|
|
|
|
|
2023-02-23 10:13:01 +00:00
|
|
|
implementation(libs.androidx.appcompat)
|
|
|
|
implementation(libs.androidx.core.ktx)
|
|
|
|
implementation(libs.androidx.work.ktx)
|
|
|
|
implementation(libs.preferencex)
|
|
|
|
implementation(libs.timber)
|
|
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
|
|
|
|
|
|
implementation(libs.glide)
|
|
|
|
annotationProcessor(libs.glide.compiler)
|
|
|
|
|
|
|
|
if (project.hasProperty("k9mail.enableLeakCanary") && project.property("k9mail.enableLeakCanary") == "true") {
|
|
|
|
debugImplementation(libs.leakcanary.android)
|
2020-10-18 14:27:14 +00:00
|
|
|
}
|
2020-05-16 19:06:06 +00:00
|
|
|
|
2020-06-23 14:29:46 +00:00
|
|
|
// Required for DependencyInjectionTest to be able to resolve OpenPgpApiManager
|
2023-02-23 10:13:01 +00:00
|
|
|
testImplementation(projects.plugins.openpgpApiLib.openpgpApi)
|
2020-06-23 14:29:46 +00:00
|
|
|
|
2023-02-23 10:13:01 +00:00
|
|
|
testImplementation(libs.robolectric)
|
2014-12-19 22:05:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
2023-02-23 10:13:01 +00:00
|
|
|
namespace = "com.fsck.k9"
|
2022-09-17 12:33:34 +00:00
|
|
|
|
2014-12-19 22:05:58 +00:00
|
|
|
defaultConfig {
|
2023-02-23 10:13:01 +00:00
|
|
|
applicationId = "com.fsck.k9"
|
|
|
|
testApplicationId = "com.fsck.k9.tests"
|
2015-12-22 16:27:33 +00:00
|
|
|
|
2023-08-18 11:57:23 +00:00
|
|
|
versionCode = 37010
|
|
|
|
versionName = "6.710"
|
2015-12-22 16:27:33 +00:00
|
|
|
|
2023-02-23 10:13:01 +00:00
|
|
|
// Keep in sync with the resource string array "supported_languages"
|
|
|
|
resourceConfigurations.addAll(
|
|
|
|
listOf(
|
|
|
|
"in", "br", "ca", "cs", "cy", "da", "de", "et", "en", "en_GB", "es", "eo", "eu", "fr", "gd", "gl",
|
2021-02-16 14:21:57 +00:00
|
|
|
"hr", "is", "it", "lv", "lt", "hu", "nl", "nb", "pl", "pt_PT", "pt_BR", "ru", "ro", "sq", "sk", "sl",
|
2022-07-26 10:34:54 +00:00
|
|
|
"fi", "sv", "tr", "el", "be", "bg", "sr", "uk", "iw", "ar", "fa", "ml", "ko", "zh_CN", "zh_TW", "ja",
|
2023-02-23 10:13:01 +00:00
|
|
|
"fy",
|
|
|
|
),
|
|
|
|
)
|
2023-04-23 04:35:37 +00:00
|
|
|
|
|
|
|
buildConfigField("String", "CLIENT_ID_APP_NAME", "\"K-9 Mail\"")
|
2014-12-19 22:05:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
signingConfigs {
|
2023-02-23 10:13:01 +00:00
|
|
|
if (project.hasProperty("k9mail.keyAlias") &&
|
|
|
|
project.hasProperty("k9mail.keyPassword") &&
|
|
|
|
project.hasProperty("k9mail.storeFile") &&
|
|
|
|
project.hasProperty("k9mail.storePassword")
|
|
|
|
) {
|
|
|
|
create("release") {
|
|
|
|
keyAlias = project.property("k9mail.keyAlias") as String
|
|
|
|
keyPassword = project.property("k9mail.keyPassword") as String
|
|
|
|
storeFile = file(project.property("k9mail.storeFile") as String)
|
|
|
|
storePassword = project.property("k9mail.storePassword") as String
|
|
|
|
}
|
|
|
|
}
|
2014-12-19 22:05:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
release {
|
2023-03-01 14:21:59 +00:00
|
|
|
signingConfigs.findByName("release")?.let { releaseSigningConfig ->
|
|
|
|
signingConfig = releaseSigningConfig
|
2014-12-19 22:05:58 +00:00
|
|
|
}
|
2015-01-03 07:29:45 +00:00
|
|
|
|
2023-02-23 10:13:01 +00:00
|
|
|
isMinifyEnabled = true
|
|
|
|
proguardFiles(
|
|
|
|
getDefaultProguardFile("proguard-android.txt"),
|
|
|
|
"proguard-rules.pro",
|
|
|
|
)
|
|
|
|
|
|
|
|
buildConfigField(
|
|
|
|
"String",
|
|
|
|
"OAUTH_GMAIL_CLIENT_ID",
|
|
|
|
"\"262622259280-hhmh92rhklkg2k1tjil69epo0o9a12jm.apps.googleusercontent.com\"",
|
|
|
|
)
|
|
|
|
buildConfigField(
|
|
|
|
"String",
|
|
|
|
"OAUTH_YAHOO_CLIENT_ID",
|
|
|
|
"\"dj0yJmk9aHNUb3d2MW5TQnpRJmQ9WVdrOWVYbHpaRWM0YkdnbWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PWIz\"",
|
|
|
|
)
|
|
|
|
buildConfigField(
|
|
|
|
"String",
|
|
|
|
"OAUTH_AOL_CLIENT_ID",
|
|
|
|
"\"dj0yJmk9dUNqYXZhYWxOYkdRJmQ9WVdrOU1YQnZVRFZoY1ZrbWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PWIw\"",
|
|
|
|
)
|
|
|
|
buildConfigField("String", "OAUTH_MICROSOFT_CLIENT_ID", "\"e647013a-ada4-4114-b419-e43d250f99c5\"")
|
|
|
|
buildConfigField(
|
|
|
|
"String",
|
|
|
|
"OAUTH_MICROSOFT_REDIRECT_URI",
|
|
|
|
"\"msauth://com.fsck.k9/Dx8yUsuhyU3dYYba1aA16Wxu5eM%3D\"",
|
|
|
|
)
|
|
|
|
|
|
|
|
manifestPlaceholders["appAuthRedirectScheme"] = "com.fsck.k9"
|
2014-12-19 22:05:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
debug {
|
2023-02-23 10:13:01 +00:00
|
|
|
applicationIdSuffix = ".debug"
|
|
|
|
enableUnitTestCoverage = testCoverageEnabled
|
|
|
|
enableAndroidTestCoverage = testCoverageEnabled
|
|
|
|
|
|
|
|
isMinifyEnabled = false
|
|
|
|
|
|
|
|
buildConfigField(
|
|
|
|
"String",
|
|
|
|
"OAUTH_GMAIL_CLIENT_ID",
|
|
|
|
"\"262622259280-5qb3vtj68d5dtudmaif4g9vd3cpar8r3.apps.googleusercontent.com\"",
|
|
|
|
)
|
|
|
|
buildConfigField(
|
|
|
|
"String",
|
|
|
|
"OAUTH_YAHOO_CLIENT_ID",
|
|
|
|
"\"dj0yJmk9ejRCRU1ybmZjQlVBJmQ9WVdrOVVrZEViak4xYmxZbWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PTZj\"",
|
|
|
|
)
|
|
|
|
buildConfigField(
|
|
|
|
"String",
|
|
|
|
"OAUTH_AOL_CLIENT_ID",
|
|
|
|
"\"dj0yJmk9cHYydkJkTUxHcXlYJmQ9WVdrOWVHZHhVVXN4VVV3bWNHbzlNQT09JnM9Y29uc3VtZXJzZWNyZXQmc3Y9MCZ4PTdm\"",
|
|
|
|
)
|
|
|
|
buildConfigField("String", "OAUTH_MICROSOFT_CLIENT_ID", "\"e647013a-ada4-4114-b419-e43d250f99c5\"")
|
|
|
|
buildConfigField(
|
|
|
|
"String",
|
|
|
|
"OAUTH_MICROSOFT_REDIRECT_URI",
|
|
|
|
"\"msauth://com.fsck.k9.debug/VZF2DYuLYAu4TurFd6usQB2JPts%3D\"",
|
|
|
|
)
|
|
|
|
|
|
|
|
manifestPlaceholders["appAuthRedirectScheme"] = "com.fsck.k9.debug"
|
2014-12-19 22:05:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
packagingOptions {
|
2023-01-16 15:24:13 +00:00
|
|
|
jniLibs {
|
2023-02-23 10:13:01 +00:00
|
|
|
excludes += listOf("kotlin/**")
|
2023-01-16 15:24:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
2023-02-23 10:13:01 +00:00
|
|
|
excludes += listOf(
|
|
|
|
"META-INF/DEPENDENCIES",
|
|
|
|
"META-INF/LICENSE",
|
|
|
|
"META-INF/LICENSE.txt",
|
|
|
|
"META-INF/NOTICE",
|
|
|
|
"META-INF/NOTICE.txt",
|
|
|
|
"META-INF/README",
|
|
|
|
"META-INF/README.md",
|
|
|
|
"META-INF/CHANGES",
|
|
|
|
"LICENSE.txt",
|
|
|
|
"META-INF/*.kotlin_module",
|
|
|
|
"META-INF/*.version",
|
|
|
|
"kotlin/**",
|
|
|
|
"DebugProbesKt.bin",
|
|
|
|
)
|
2023-01-16 15:24:13 +00:00
|
|
|
}
|
2014-12-19 22:05:58 +00:00
|
|
|
}
|
|
|
|
}
|