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

Force Jacoco version 0.8.2 for OpenJDK 11 compatibility #517

Merged
merged 1 commit into from
Nov 24, 2018

Conversation

apjanke
Copy link
Contributor

@apjanke apjanke commented Nov 24, 2018

The jacoco Gradle plugin seems to be defaulting to Jacoco 0.8.1, which breaks when run against OpenJDK 11. This PR adds an explicit version to force it to use 0.8.2.

JDK 11 support was added recently and picked up in Jacoco 0.8.2: jacoco/jacoco#663

This fixes test errors as seen in #513 (comment), which look like the following.

FATAL ERROR in native method: processing of -javaagent failed
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
        at java.base/java.lang.Class.getField(Class.java:2000)
        at org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
        ... 9 more
Process 'Gradle Test Executor 9' finished with non-zero exit value 134
org.gradle.process.internal.ExecException: Process 'Gradle Test Executor 9' finished with non-zero exit value 134
        at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:395)
        at org.gradle.process.internal.worker.DefaultWorkerProcess.onProcessStop(DefaultWorkerProcess.java:138)
[...]

The jacoco Gradle plugin seems to be defaulting to Jacoco 0.8.1, which
breaks when run against OpenJDK 11.
@domesticmouse domesticmouse merged commit b06d1f5 into googlemaps:master Nov 24, 2018
@domesticmouse
Copy link
Contributor

Shiny! Thanks :-)

@apjanke
Copy link
Contributor Author

apjanke commented Nov 24, 2018

No problem!

Note for future: we can probably remove this once Gradle 5 is released and we are using it; the default has been changed to 0.8.2 in Gradle's master.

@apjanke apjanke deleted the jacoco-jdk-11 branch November 24, 2018 07:37
@domesticmouse
Copy link
Contributor

Are we still barred from using gradle 5 due to the GAE libraries? I haven’t seen the warning log entries in a while, but I haven’t been looking for them either. Happy to roll up to Gradle 5rc2 to check

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.

None yet

2 participants