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

Compile failure using JDK 21 #1

Open
DarkTyger opened this issue Jan 3, 2024 · 1 comment
Open

Compile failure using JDK 21 #1

DarkTyger opened this issue Jan 3, 2024 · 1 comment

Comments

@DarkTyger
Copy link

DarkTyger commented Jan 3, 2024

$ java --version
openjdk 21.0.1 2023-10-17 LTS
OpenJDK Runtime Environment (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM (build 21.0.1+12-LTS, mixed mode, sharing)
$ cd /tmp
$ git clone https://github.com/TheLogicMaster/clearwing-vm
$ chmod +x gradlew
$ ./gradlew jar

Expected
JAR file is built.

Actual

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file '/tmp/clearwing-vm/settings.gradle' ($HOME/.gradle/caches/7.4/scripts/dr00kelqk5ipjhe1a5mvwuy8p).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

Additional details

$ gradle --version

------------------------------------------------------------
Gradle 8.5
------------------------------------------------------------

Build time:   2023-11-29 14:08:57 UTC
Revision:     28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          21.0.1 (BellSoft 21.0.1+12-LTS)
OS:           Linux 6.6.7-arch1-1 amd64
$ gradle jar

Output:

$ gradle jar

> Task :annotations:compileJava
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings

> Task :example:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':example:compileJava'.
> Could not resolve all files for configuration ':example:compileClasspath'.
   > Could not find com.thelogicmaster.clearwing-vm:annotations:2.0.0.
     Searched in the following locations:
       - file:$HOME/.m2/repository/com/thelogicmaster/clearwing-vm/annotations/2.0.0/annotations-2.0.0.pom
       - https://repo.maven.apache.org/maven2/com/thelogicmaster/clearwing-vm/annotations/2.0.0/annotations-2.0.0.pom
       - https://jitpack.io/com/thelogicmaster/clearwing-vm/annotations/2.0.0/annotations-2.0.0.pom
     Required by:
         project :example
@nulldoubt
Copy link

I hope I'm not late. It seems like your issue is most likely with the versioning.

Take a look at the JitPack for this library.

The versions have a prefixed v in them, e.g. v2.1.0, v2.0.0 and your repository configuration doesn't seem to include that prefixed v.

Try changing the com.thelogicmaster.clearwing-vm:annotations:2.0.0 line in your build.gradle file with com.thelogicmaster.clearwing-vm:annotations:v2.0.0

Or even better, use the latest version: com.thelogicmaster.clearwing-vm:annotations:v2.1.0

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

No branches or pull requests

2 participants