Skip to content

Commit

Permalink
Spotless with ratchet (#7133)
Browse files Browse the repository at this point in the history
Co-authored-by: Goooler <[email protected]>
  • Loading branch information
yschimke and Goooler authored Feb 28, 2022
1 parent 4256335 commit 7039c4a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure JDK
uses: actions/setup-java@v3
Expand Down
19 changes: 18 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.diffplug.gradle.spotless.SpotlessExtension
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
import java.net.URL
Expand Down Expand Up @@ -69,7 +70,6 @@ subprojects {
if (project.name == "regression-test") return@subprojects

apply(plugin = "checkstyle")
apply(plugin = "com.diffplug.spotless")
apply(plugin = "ru.vyarus.animalsniffer")
apply(plugin = "biz.aQute.bnd.builder")

Expand Down Expand Up @@ -173,6 +173,23 @@ subprojects {
}
}

apply(plugin = "com.diffplug.spotless")
configure<SpotlessExtension> {
ratchetFrom("origin/master")
kotlin {
target("**/*.kt")
ktlint(libs.versions.ktlint.get()).userData(
mapOf(
"indent_size" to "2",
"disabled_rules" to "filename"
)
)
trimTrailingWhitespace()
endWithNewline()
}
}


tasks.withType<JavaCompile> {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ org-conscrypt = "2.5.2"
org-jetbrains-kotlin = "1.6.10"
org-junit-jupiter = "5.8.2"
picocli = "4.6.3"
ktlint = "0.44.0"

[libraries]
amazonCorretto = "software.amazon.cryptools:AmazonCorrettoCryptoProvider:1.6.1"
Expand Down

0 comments on commit 7039c4a

Please sign in to comment.