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

Support Java > 15 and Datanucleus 6 #435

Open
aley2003 opened this issue Dec 28, 2022 · 9 comments
Open

Support Java > 15 and Datanucleus 6 #435

aley2003 opened this issue Dec 28, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@aley2003
Copy link
Contributor

It would be nice if datanucleus-gradle-plugin could support higher Java versions than 15.
If I try to build my project for Datanucleus 6.0.3 and Java 17 I get strange ASM errors.
Perhaps this is related to
//Forcing toolchain use to 15. Newer JDK versions cause ASMEnhancer to fail for some obscure reason languageVersion = JavaLanguageVersion.of(8)
in build.gradle.
Perhaps is solved with ASM 9.4 used by Datanucleus 6.0.3?

@rm3l
Copy link
Owner

rm3l commented Jul 22, 2023

Thanks for reporting this. Interested in opening up a PR for this?

@rm3l rm3l added the enhancement New feature or request label Jul 22, 2023
@aley2003
Copy link
Contributor Author

aley2003 commented Jul 24, 2023

To be honest, I have a running version of your plugin with Datanucleus 6, Java 17 and gradle 8.1.1 on Windows.
For Windows I had had to change some path handling in tests ('/' vs. '\').
I had fixed some Closure to Closure<?> too.
I think the new version will not work for Datanucleus 5 any longer.
To get my version deployable for all I need to backport it to Java 11.
Should I try it?
Which gradle wrapper version should I use (8.2.1?)?

@thc202
Copy link
Contributor

thc202 commented Jul 24, 2023

The plugin is still being built with Java 8, in CI.

@aley2003
Copy link
Contributor Author

Datanucleus 6 needs Java version 11 at least

@thc202
Copy link
Contributor

thc202 commented Jul 24, 2023

What version Datanucleus needs is not a requirement for Gradle/plugin, in any case just saying the minimum version the plugin is currently targeting (I don't mind the bump, already using newer Java versions than 8).

@aley2003
Copy link
Contributor Author

If I revert the java.toolchain.languageVersion to 8 I get

bad class file: ...\datanucleus-core-6.0.4.jar(org/datanucleus/store/schema/SchemaTool.class)
    class file has wrong version 55.0, should be 52.0

So I think we do need Java 11 to support Datanucleus 6.

@thc202
Copy link
Contributor

thc202 commented Jul 25, 2023

That assumes the plugin would not be updated to allow to specify a toolchain for Datanucleus tasks.

@aley2003
Copy link
Contributor Author

Do you talk about an additional toolchain for Datanucleus tasks?
Can you please explain how this could work and why we would need this?

Every project using Datanucleus 6 will need Java 11 at least.
So every user of datanucleus-gradle-plugin for Datanucleus 6 will have Java 11 at least.

@aley2003
Copy link
Contributor Author

aley2003 commented Aug 3, 2023

I have created PR #521

aley2003 pushed a commit to aley2003/datanucleus-gradle-plugin that referenced this issue Sep 14, 2023
aley2003 pushed a commit to aley2003/datanucleus-gradle-plugin that referenced this issue Sep 14, 2023
aley2003 pushed a commit to aley2003/datanucleus-gradle-plugin that referenced this issue Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants