Skip to content

[gradle-plugin]: Latest update (5.5.0) is broken on JDK loom eap builds #693

@sureshg

Description

@sureshg
  • summary of problem
    This commit is broken on JDK loom EAP builds (java.lang.StringIndexOutOfBoundsException). The plugin was working fine on all JDK eap versions, including project loom . The version format used is,
$ java -version    
openjdk version "16-loom" 2021-03-16
OpenJDK Runtime Environment (build 16-loom+6-105)
OpenJDK 64-Bit Server VM (build 16-loom+6-105, mixed mode, sharing)

Is it possible to handle the EAP version also?

  • gradle or maven version
    • 6.7-rc-1
  • spotless version
    • 5.5.0
  • operating system and version
    • Mac OSX (10.13.6)
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
spotless {
    java {
        googleJavaFormat(Versions.googleJavaFormat)
    }
  kotlin {
        ktlint(Versions.ktlint).userData(mapOf("disabled_rules" to "no-wildcard-imports"))
        targetExclude("$buildDir/**/*.kt", "bin/**/*.kt")
        // licenseHeader(License.Apache)
    }
  kotlinGradle {
        ktlint(Versions.ktlint).userData(mapOf("disabled_rules" to "no-wildcard-imports"))
        target("*.gradle.kts")
    }
  format("misc") {
        target("**/*.md", "**/.gitignore")
        trimTrailingWhitespace()
        endWithNewline()
    }
 }
  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 7
        at com.diffplug.spotless.java.GoogleJavaFormatStep.<clinit>(GoogleJavaFormatStep.java:84)
        ... 199 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions