Open cxjava opened 2 years ago
Apache Geode is seeing a similar warning when using Spotless on groovyGradle
types:
groovyGradle {
target project.fileTree(project.projectDir) {
include '**/*.gradle'
exclude '**/generated-src/**'
exclude '**/build/**'
}
greclipse()
yields:
Errors occurred while build effective model from ~/.gradle/caches/modules-2/files-2.1/org.eclipse.platform/org.eclipse.swt/3.119.0/c5dde86661050197de73252c86bfe81676deca18/org.eclipse.swt-3.119.0.pom:
'dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. in org.eclipse.platform:org.eclipse.swt:3.119.0
Maybe that helps with the investigation - the error starts appearing after 4.6.3
... using greclipse("4.6.3")
I can run spotless without error.
@carhartl Trying to embed spotless in a lib that has to format Groovy. I've tried to set that version but I got:
Caused by: java.lang.IllegalArgumentException: 4.8 is the oldest version we support, this was 4.6
at com.diffplug.spotless.extra.groovy.GrEclipseFormatterStep$1.model(GrEclipseFormatterStep.java:50)
at com.diffplug.spotless.extra.EquoBasedStepBuilder.createModelWithMirrors(EquoBasedStepBuilder.java:126)
at com.diffplug.spotless.extra.EquoBasedStepBuilder.get(EquoBasedStepBuilder.java:107)
... 76 more
Maybe that helps with the investigation - the error starts appearing after
4.6.3
... usinggreclipse("4.6.3")
I can run spotless without error.
I tried this but getting the following error Gradle v8.6 Spotless Plugin v 6.25.0
* What went wrong:
Could not determine the dependencies of task ':spotlessApply'.
> Could not create task ':spotlessGroovyApply'.
> Could not create task ':spotlessGroovy'.
> java.io.IOException: Failed to load eclipse groovy formatter: java.lang.NumberFormatException: For input string: "6.3"
I started getting below error when I moved from spotless version 5.17.1 to 6.0.1 on gradle 8.5. I am trying to use predeclareDepsFromBuildscript to get the old behavior but that's not working as well.
dependencies.dependency.artifactId' for org.eclipse.platform:org.eclipse.swt.${osgi.platform}:jar with value 'org.eclipse.swt.${osgi.platform}' does not match a valid id pattern. in org.eclipse.platform:org.eclipse.swt:3.125.0
when i run
./gradlew spotlessApply --info
it show below warning:I try this way, but also failed
// substitute(platform(module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}:3.118.0'))). // using module('org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64:3.118.0') // substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}:3.118.0') with module("org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64:3.118.0") } } }
apply plugin: "com.diffplug.spotless" apply plugin: 'groovy'
spotless { groovy { importOrder() greclipse('4.21.0') } groovyGradle { greclipse() } }
If you're just submitting a feature request or question, no need for the above.