-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
61 lines (56 loc) · 2.46 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
// Copyright 2023, Addhen Limited and the FOSDEM Event app project contributors
// SPDX-License-Identifier: Apache-2.0
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
plugins {
id("com.addhen.fosdem.gradle.plugins.root")
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.kotlin.serialization) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.compose.multiplatform) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.licensee) apply false
alias(libs.plugins.deployGate) apply false
}
subprojects {
tasks.withType<KotlinCompilationTask<*>>().configureEach {
compilerOptions {
allWarningsAsErrors.set(true)
if (this is KotlinJvmCompilerOptions) {
// Stub gen copies args from the parent compilation
if (this@configureEach !is KaptGenerateStubsTask) {
freeCompilerArgs.addAll(
"-Xjsr305=strict",
// Match JVM assertion behavior:
// https://publicobject.com/2019/11/18/kotlins-assert-is-not-like-javas-assert/
"-Xassertions=jvm",
// Potentially useful for static analysis tools or annotation processors.
"-Xemit-jvm-type-annotations",
// Enable new jvm-default behavior
// https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces/
"-Xjvm-default=all",
// https://kotlinlang.org/docs/whatsnew1520.html#support-for-jspecify-nullness-annotations
"-Xtype-enhancement-improvements-strict-mode",
"-Xjspecify-annotations=strict",
// expect/actual classes (including interfaces, objects, annotations, enums, actual typealiases) in Beta
// https://youtrack.jetbrains.com/issue/KT-61573
"-Xexpect-actual-classes",
)
}
}
progressiveMode.set(true)
}
}
// Needed for tests to run otherwise it errors
tasks.withType<Test> {
useJUnitPlatform()
}
}