Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump spotless plugin so it works without flags in JDK16+ #1374

Closed
wants to merge 4 commits into from

Conversation

midgleyc
Copy link
Contributor

Running 5.12.1 gives an IllegalAccessError:

java.lang.IllegalAccessError: class com.google.googlejavaformat.java.JavaInput (in unnamed module @0x7f85e8d3) cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x7f85e8d3

5.17.1 just works, and should still work on Java 8.

@midgleyc
Copy link
Contributor Author

Java 11 fails, nevermind that then.

@midgleyc midgleyc closed this Aug 15, 2023
@gbrail
Copy link
Collaborator

gbrail commented Aug 15, 2023

Thanks for looking at this.

I think that I was able to get a version that worked for all versions by using the latest "spotless" plugin from Maven Central (so that it runs on newer VMs) but an older version of google-java-format (so that it doesn't break older VMs), like this:

googleJavaFormat('1.10.0').aosp()

Can you try that? We can use that for now if it works for you and then switch to a newer spotless when we move on from Java 11.

@midgleyc midgleyc reopened this Aug 16, 2023
@midgleyc
Copy link
Contributor Author

midgleyc commented Aug 16, 2023

no, no luck there. 1.10 fails on 11, and 1.11 fails on 8.

This is the version immediately before JVM 11 was the minimum version.
@midgleyc
Copy link
Contributor Author

I think this is going to have to wait until Rhino goes to 11.

@midgleyc midgleyc closed this Aug 16, 2023
@gbrail
Copy link
Collaborator

gbrail commented Aug 16, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants