forked from chrisbanes/tivi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
57 lines (50 loc) · 2.02 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright 2023, Christopher Banes and the Tivi project contributors
// SPDX-License-Identifier: Apache-2.0
import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask
import com.android.build.gradle.internal.lint.AndroidLintTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
plugins {
id("app.tivi.root")
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.cacheFixPlugin) apply false
alias(libs.plugins.android.lint) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.gms.googleServices) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.composeMultiplatform) apply false
}
allprojects {
// Workaround for https://issuetracker.google.com/issues/268961156
tasks.withType<AndroidLintTask> {
tasks.findByName("kspTestKotlin")?.let {
dependsOn(it)
}
}
tasks.withType<AndroidLintAnalysisTask> {
tasks.findByName("kspTestKotlin")?.let {
dependsOn(it)
}
}
tasks.withType<KotlinCompilationTask<*>>().configureEach {
compilerOptions {
// Treat all Kotlin warnings as errors
allWarningsAsErrors.set(true)
if (project.hasProperty("tivi.enableComposeCompilerReports")) {
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_metrics",
)
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_metrics",
)
}
}
}
}