Skip to content

Commit

Permalink
Spotless with ratchet
Browse files Browse the repository at this point in the history
  • Loading branch information
yschimke committed Feb 28, 2022
1 parent 1b7a85d commit 6e2832c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
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("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
5 changes: 3 additions & 2 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 Expand Up @@ -52,7 +53,7 @@ junit = "junit:junit:4.13.2"
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "org-junit-jupiter" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "org-junit-jupiter" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "org-junit-jupiter" }
junit-platform-console = "org.junit.platform:junit-platform-console:1.8.2"
junit-platform-console = "org.junit.platform:junit-platform-console:1.7.2"
junit-vintage-engine = "org.junit.vintage:junit-vintage-engine:5.8.2"
junit5android-core = { module = "de.mannodermaus.junit5:android-test-core", version.ref = "de-mannodermaus-junit5" }
junit5android-runner = { module = "de.mannodermaus.junit5:android-test-runner", version.ref = "de-mannodermaus-junit5" }
Expand All @@ -68,7 +69,7 @@ nativeImageSvm = { module = "org.graalvm.nativeimage:svm", version.ref = "graalv
openjsse = "org.openjsse:openjsse:1.1.9"
picocli = { module = "info.picocli:picocli", version.ref = "picocli" }
picocli-compiler = { module = "info.picocli:picocli-codegen", version.ref = "picocli" }
playservices-safetynet = "com.google.android.gms:play-services-safetynet:18.0.1"
playservices-safetynet = "com.google.android.gms:play-services-safetynet:17.0.1"
robolectric-android = "org.robolectric:android-all:12-robolectric-7732740"
signature-android-apilevel21 = "net.sf.androidscents.signature:android-api-level-21:5.0.1_r2"
squareup-moshi = { module = "com.squareup.moshi:moshi", version.ref = "com-squareup-moshi" }
Expand Down

0 comments on commit 6e2832c

Please sign in to comment.