/
autostyle.gradle.kts
50 lines (45 loc) · 1.19 KB
/
autostyle.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
import com.github.autostyle.gradle.AutostyleExtension
apply(plugin = "com.github.autostyle")
repositories {
mavenCentral()
}
plugins.withType<JavaPlugin> {
configure<AutostyleExtension> {
java {
removeUnusedImports()
importOrder("static ", "static java.", "static javax.", "", "java.", "javax.")
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
}
}
plugins.withId("org.jetbrains.kotlin.jvm") {
configure<AutostyleExtension> {
kotlin {
ktlint {
userData(mapOf(
"disabled_rules" to "no-wildcard-imports,import-ordering"
))
}
trimTrailingWhitespace()
endWithNewline()
}
}
}
configure<AutostyleExtension> {
kotlinGradle {
ktlint()
trimTrailingWhitespace()
endWithNewline()
}
freshmark {
filter.include("**/*.md")
propertiesFile("$rootDir/gradle.properties")
properties {
put("yes", ":+1:")
put("no", ":white_large_square:")
put("stableGradle", get("released.version") as String)
}
}
}