-
-
Notifications
You must be signed in to change notification settings - Fork 543
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
53 lines (49 loc) · 1.78 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
53 lines (49 loc) · 1.78 KB
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
import com.diffplug.gradle.spotless.SpotlessExtension
import com.diffplug.spotless.extra.wtp.EclipseWtpFormatterStep
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.licensee) apply false
alias(libs.plugins.spotless) apply false
}
allprojects {
apply(plugin = "com.diffplug.spotless")
extensions.configure<SpotlessExtension> {
format("xml") {
target("app/assets/appfilter.xml")
eclipseWtp(EclipseWtpFormatterStep.XML).configFile("$rootDir/spotless.xml.prefs")
}
kotlin {
target("src/**/*.kt")
ktlint(libs.ktlint.get().version).customRuleSets(
listOf(
libs.composeRules.get().toString(),
),
).editorConfigOverride(
mapOf(
"ktlint_compose_compositionlocal-allowlist" to "disabled",
"ktlint_compose_lambda-param-event-trailing" to "disabled",
"ktlint_compose_content-slot-reused" to "disabled",
),
)
}
kotlinGradle {
ktlint(libs.ktlint.get().version)
}
}
plugins.withType<JavaBasePlugin>().configureEach {
extensions.configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
}
}
}