2023-01-08 02:14:00 +00:00
|
|
|
plugins {
|
|
|
|
alias(libs.plugins.android.application) apply false
|
|
|
|
alias(libs.plugins.android.library) apply false
|
|
|
|
alias(libs.plugins.android.lint) apply false
|
2024-01-19 15:37:20 +00:00
|
|
|
alias(libs.plugins.android.test) apply false
|
2023-01-08 02:14:00 +00:00
|
|
|
alias(libs.plugins.kotlin.android) apply false
|
|
|
|
alias(libs.plugins.kotlin.jvm) apply false
|
2024-01-19 15:37:20 +00:00
|
|
|
alias(libs.plugins.kotlin.parcelize) apply false
|
|
|
|
alias(libs.plugins.ksp) apply false
|
2023-02-13 16:18:33 +00:00
|
|
|
|
2023-02-16 10:00:25 +00:00
|
|
|
id("thunderbird.quality.spotless")
|
2023-02-24 10:01:41 +00:00
|
|
|
id("thunderbird.dependency.check")
|
2013-05-25 21:14:46 +00:00
|
|
|
}
|
|
|
|
|
2023-02-13 14:59:46 +00:00
|
|
|
val propertyTestCoverage: String? by extra
|
2014-08-30 23:10:13 +00:00
|
|
|
|
2022-12-07 04:19:41 +00:00
|
|
|
allprojects {
|
2023-02-13 14:59:46 +00:00
|
|
|
extra.apply {
|
2023-02-23 10:13:01 +00:00
|
|
|
set("testCoverageEnabled", propertyTestCoverage != null)
|
2023-02-13 14:59:46 +00:00
|
|
|
}
|
|
|
|
|
2023-01-24 18:09:37 +00:00
|
|
|
configurations.configureEach {
|
2021-10-30 00:31:37 +00:00
|
|
|
resolutionStrategy.dependencySubstitution {
|
2023-02-13 14:59:46 +00:00
|
|
|
substitute(module("androidx.core:core"))
|
|
|
|
.using(module("androidx.core:core:${libs.versions.androidxCore.get()}"))
|
|
|
|
substitute(module("androidx.activity:activity"))
|
|
|
|
.using(module("androidx.activity:activity:${libs.versions.androidxActivity.get()}"))
|
|
|
|
substitute(module("androidx.activity:activity-ktx"))
|
|
|
|
.using(module("androidx.activity:activity-ktx:${libs.versions.androidxActivity.get()}"))
|
|
|
|
substitute(module("androidx.appcompat:appcompat"))
|
|
|
|
.using(module("androidx.appcompat:appcompat:${libs.versions.androidxAppCompat.get()}"))
|
|
|
|
substitute(module("androidx.recyclerview:recyclerview"))
|
|
|
|
.using(module("androidx.recyclerview:recyclerview:${libs.versions.androidxRecyclerView.get()}"))
|
|
|
|
substitute(module("androidx.constraintlayout:constraintlayout"))
|
2023-02-22 09:25:12 +00:00
|
|
|
.using(
|
|
|
|
module(
|
|
|
|
"androidx.constraintlayout:constraintlayout:${libs.versions.androidxConstraintLayout.get()}",
|
|
|
|
),
|
|
|
|
)
|
2023-02-13 14:59:46 +00:00
|
|
|
substitute(module("androidx.drawerlayout:drawerlayout"))
|
|
|
|
.using(module("androidx.drawerlayout:drawerlayout:${libs.versions.androidxDrawerLayout.get()}"))
|
|
|
|
substitute(module("androidx.lifecycle:lifecycle-livedata"))
|
|
|
|
.using(module("androidx.lifecycle:lifecycle-livedata:${libs.versions.androidxLifecycle.get()}"))
|
|
|
|
substitute(module("androidx.transition:transition"))
|
|
|
|
.using(module("androidx.transition:transition:${libs.versions.androidxTransition.get()}"))
|
|
|
|
substitute(module("org.jetbrains:annotations"))
|
|
|
|
.using(module("org.jetbrains:annotations:${libs.versions.jetbrainsAnnotations.get()}"))
|
|
|
|
substitute(module("org.jetbrains.kotlinx:kotlinx-coroutines-android"))
|
2023-02-22 09:25:12 +00:00
|
|
|
.using(
|
|
|
|
module(
|
2023-04-05 15:49:26 +00:00
|
|
|
"org.jetbrains.kotlinx:kotlinx-coroutines-android:${libs.versions.kotlinxCoroutines.get()}",
|
2023-02-22 09:25:12 +00:00
|
|
|
),
|
|
|
|
)
|
2021-10-30 00:31:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-13 14:59:46 +00:00
|
|
|
tasks.withType<Test> {
|
|
|
|
testLogging {
|
|
|
|
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
|
|
|
|
showCauses = true
|
|
|
|
showExceptions = true
|
|
|
|
showStackTraces = true
|
2021-05-28 11:26:19 +00:00
|
|
|
}
|
|
|
|
}
|
2014-08-30 23:10:13 +00:00
|
|
|
}
|
2022-01-28 03:07:22 +00:00
|
|
|
|
2023-02-13 14:59:46 +00:00
|
|
|
tasks.register("testsOnCi") {
|
2023-11-24 13:05:40 +00:00
|
|
|
val skipTests = setOf("testReleaseUnitTest")
|
|
|
|
|
2023-02-13 14:59:46 +00:00
|
|
|
dependsOn(
|
|
|
|
subprojects.map { project -> project.tasks.withType(Test::class.java) }
|
2022-01-28 03:07:22 +00:00
|
|
|
.flatten()
|
2023-11-24 13:05:40 +00:00
|
|
|
.filterNot { task -> task.name in skipTests },
|
2023-02-13 14:59:46 +00:00
|
|
|
)
|
2022-01-28 03:07:22 +00:00
|
|
|
}
|
2023-04-18 08:47:21 +00:00
|
|
|
|
|
|
|
tasks.named<Wrapper>("wrapper") {
|
|
|
|
gradleVersion = libs.versions.gradle.get()
|
|
|
|
distributionType = Wrapper.DistributionType.ALL
|
|
|
|
}
|