-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.gradle.kts
59 lines (53 loc) · 2 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
58
59
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
plugins {
id("app.deckbox.root")
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.android.lint) apply false
alias(libs.plugins.android.test) apply false
alias(libs.plugins.cacheFixPlugin) apply false
alias(libs.plugins.composeMultiplatform) apply false
// alias(libs.plugins.firebase.crashlytics) apply false
// alias(libs.plugins.gms.googleServices) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.sqldelight) apply false
}
buildscript {
dependencies {
// Yuck. Need to force kotlinpoet:1.16.0 as that is what buildconfig uses.
// CMP 1.6.0-x uses kotlinpoet:1.14.x. Gradle seems to force 1.14.x which then breaks
// buildconfig.
classpath("com.squareup:kotlinpoet:1.18.1")
}
}
allprojects {
val projectName = this.path
tasks.withType<KotlinCompilationTask<*>>().configureEach {
compilerOptions {
// Treat all Kotlin warnings as errors
allWarningsAsErrors.set(true)
if (project.hasProperty("deckbox.enableComposeCompilerReports") && projectName != ":common:compose") {
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.layout.buildDirectory.asFile.get().absolutePath + "/compose_metrics",
)
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.layout.buildDirectory.asFile.get().absolutePath + "/compose_metrics",
)
}
}
}
}
tasks.register<Copy>("bootstrap") {
from(file("scripts/pre-push"))
into(file(".git/hooks"))
fileMode = 777
}