forked from dhis2/dhis2-mobile-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
67 lines (61 loc) · 2.38 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
60
61
62
63
64
65
66
67
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("multiplatform") apply false
id("com.android.application") apply false
id("com.android.library") apply false
id("org.jetbrains.compose") apply false
id("org.jlleitschuh.gradle.ktlint") version "11.5.1"
}
allprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
ktlint {
version.set("0.50.0")
verbose.set(true)
outputToConsole.set(true)
}
tasks.withType<KotlinCompile>().all {
kotlinOptions { freeCompilerArgs += "-Xexpect-actual-classes" }
}
}
subprojects {
tasks.withType<KotlinCompilationTask<*>>().configureEach {
compilerOptions {
// Treat all Kotlin warnings as errors
allWarningsAsErrors.set(true)
if (project.providers.gradleProperty("enableComposeCompilerReports").isPresent) {
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
layout.buildDirectory.asFile.get().absolutePath +
"/compose_metrics",
)
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
layout.buildDirectory.asFile.get().absolutePath +
"/compose_metrics",
)
}
}
}
plugins.withId("app.cash.paparazzi") {
// Defer until afterEvaluate so that testImplementation is created by Android plugin.
afterEvaluate {
dependencies.constraints {
add("testImplementation", "com.google.guava:guava") {
attributes {
attribute(
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
objects.named(TargetJvmEnvironment::class.java, TargetJvmEnvironment.STANDARD_JVM),
)
}
because(
"LayoutLib and sdk-common depend on Guava's -jre published variant." +
"See https://github.com/cashapp/paparazzi/issues/906.",
)
}
}
}
}
}