-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
38 lines (35 loc) · 1.26 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
@file:Suppress("UNUSED_EXPRESSION")
// Top-level build file where you can add configuration options common to all sub-projects/modules.
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.kotlinAndroid) apply false
id("com.diffplug.spotless") version "6.19.0" apply false
}
true // Needed to make the Suppress annotation work for the plugins block
subprojects {
apply(plugin = "com.diffplug.spotless")
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
target("**/*.kt")
targetExclude("$buildDir/**/*.kt")
ktlint()
licenseHeaderFile(rootProject.file("LicenseHeaderFile.txt"))
}
java {
target("**/*.java")
targetExclude("$buildDir/**/*.java")
// apply a specific flavor of google-java-format
googleJavaFormat()
// fix formatting of type annotations
formatAnnotations()
removeUnusedImports()
toggleOffOn()
licenseHeaderFile(rootProject.file("LicenseHeaderFile.txt"))
}
kotlinGradle {
target("*.gradle.kts")
ktlint()
}
}
}