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

Fix gems in gradle 8.7 #726

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

markslater
Copy link

Fixes #725.

I need some guidance on how the maintainers would like to handle one issue:

I've included a change to the test config that demonstrates the original issue with Gradle 8.7, but with the fix, the Gradle 8.7 tests fail for a different reason, which I suspect is caused by this Gradle 8.7 TestKit bug: gradle/gradle#28729. That TestKit bug is fixed in the upcoming Gradle 8.8-RC1.

I've manually tested my change, and confirmed it fixes the issue.

Three options come to mind:

  1. Remove the Gradle 8.7 tests; the existing tests prove this change doesn't break the plugin for previous versions of Gradle.
  2. Wait for Gradle 8.8-RC1.
  3. Wait for Gradle 8.8.

For reference, the test failures are like this:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/gradle/internal/classpath/InstrumentableClosure
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)
	at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:670)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:652)
Caused by: java.lang.ClassNotFoundException: org.gradle.internal.classpath.InstrumentableClosure
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	... 19 more

> Task :asciidoctor FAILED

…le 8.7 tests, but confirmed to work through manual testing; suspected to be a problem with Test Kit in Gradle 8.7.
…umentation bug that causes spurious test failures.
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.

Gems don't work with Gradle >= 8.7
1 participant