Skip to content

Commit ef12050

Browse files
committed
Fix scalafix errors
(git cherry-pick 3a67ec4) The `ignoreSourceSets` config is needed to fix errors like this: ``` Execution failed for task ':yubico-util:configSemanticDBMain'. > Failed to calculate the value of task ':yubico-util:configSemanticDBMain' property 'scalaVersion'. > Unable to detect the Scala version for the 'main' source set. Please ensure it declares dependency to scala-library or consider adding it to 'ignoreSourceSets' ``` The change to `project-convention-code-formatting-internal.gradle` is needed to fix this error: ``` Execution failed for task ':yubico-util-scala:compileScala'. > Could not resolve all files for configuration ':yubico-util-scala:detachedConfiguration1'. > Could not find org.scalameta:semanticdb-scalac_2.13.13:4.5.5. Searched in the following locations: - https://repo.maven.apache.org/maven2/org/scalameta/semanticdb-scalac_2.13.13/4.5.5/semanticdb-scalac_2.13.13-4.5.5.pom If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the re pository declaration. Required by: project :yubico-util-scala ```
1 parent 7a785f7 commit ef12050

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

buildSrc/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies {
1515

1616
// Spotless dropped Java 8 support in version 2.33.0
1717
if (JavaVersion.current().isJava11Compatible) {
18-
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.19.0")
19-
implementation("io.github.cosmicsilence:gradle-scalafix:0.1.14")
18+
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0")
19+
implementation("io.github.cosmicsilence:gradle-scalafix:0.2.2")
2020
}
2121
}

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

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

1313
scalafix {
1414
configFile.set(project.rootProject.file("scalafix.conf"))
15-
16-
// Work around dependency resolution issues in April 2022
17-
semanticdb.autoConfigure.set(true)
18-
semanticdb.version.set("4.5.5")
1915
}
2016

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

webauthn-server-attestation/build.gradle.kts

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

webauthn-server-demo/build.gradle.kts

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

0 commit comments

Comments
 (0)