Skip to content

Commit 48d9688

Browse files
committed
Apply scalafix settings conditionally
The scalafix plugin is not applied when running in Java 8, so its settings must also be applied conditionally in order to not break the JDK 8 build.
1 parent 3a67ec4 commit 48d9688

File tree

5 files changed

+4
-16
lines changed

5 files changed

+4
-16
lines changed

buildSrc/src/main/groovy/project-convention-code-formatting-internal.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ spotless {
1212

1313
scalafix {
1414
configFile.set(project.rootProject.file("scalafix.conf"))
15+
16+
if (project.name != "yubico-util-scala") {
17+
ignoreSourceSets.add("main")
18+
}
1519
}
1620

1721
project.dependencies.scalafix("com.github.liancheng:organize-imports_2.13:0.6.0")

webauthn-server-attestation/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,3 @@ tasks.javadoc.configure {
8686
// Use this instead for local testing
8787
//(options as StandardJavadocDocletOptions).linksOffline("file://${coreJavadoc.destinationDir}", "${coreJavadoc.destinationDir}")
8888
}
89-
90-
scalafix {
91-
ignoreSourceSets.add("main")
92-
}

webauthn-server-core/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,3 @@ tasks.withType(Jar::class) {
6868
))
6969
}
7070
}
71-
72-
scalafix {
73-
ignoreSourceSets.add("main")
74-
}

webauthn-server-demo/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,3 @@ for (task in listOf(tasks.installDist, tasks.distZip, tasks.distTar)) {
7171
}
7272
}
7373
}
74-
75-
scalafix {
76-
ignoreSourceSets.add("main")
77-
}

yubico-util/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,3 @@ tasks.jar {
4949
))
5050
}
5151
}
52-
53-
scalafix {
54-
ignoreSourceSets.add("main")
55-
}

0 commit comments

Comments
 (0)