0
A problem occurred evaluating root project 'xxx'.
> Could not create task ':prepareRelease'.
   > Could not create task of type 'GitReleaseTask'.
      > Could not generate a decorated class for type GitReleaseTask.
         > org/eclipse/jgit/lib/ObjectId has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

GitReleaseTask.groovy is groovy task which use org.eclipse.jgit library from gradle. I get the above exception while am building my project. I have also noticed jgit v5.13 in classpath of my project currently. The build was successful till few days back and all of the sudden it fails. My guess is that jgit v5.13 is built using advanced versions of Java and we are using Java8 to build our project.

Can someone help?

JMBA
  • 79
  • 1
  • 12
  • 1
    Does this answer your question? [How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version](https://stackoverflow.com/questions/10382929/how-to-fix-java-lang-unsupportedclassversionerror-unsupported-major-minor-versi) – cfrick Dec 02 '21 at 11:19
  • 1
    55 is Java 11... jgit 6.x requires Java 11. Are you sure jgit 6 hasn't snuck into your dependencies? A build scan would show https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html – tim_yates Dec 02 '21 at 11:41
  • As jgit 6 came out on the 29th November, I would bet you have a wildcard dependency on it, and haven't specified a specific version https://search.maven.org/artifact/org.eclipse.jgit/org.eclipse.jgit – tim_yates Dec 02 '21 at 12:47
  • configurations { all { resolutionStrategy { force 'org.eclipse.core:commands:3.3.0-I20070605-0010' force 'org.eclipse.equinox:common:3.6.200-v20130402-150 force 'org.eclipse.jgit:org.eclipse.jgit:5.5.0.201909110433-r' } } } Also added under dependencyManagement as follows dependency 'org.eclipse.jgit:org.eclipse.jgit:5.5.0.201909110433-r' But still it's not working, somehow it's picking version 6 – JMBA Dec 02 '21 at 13:37
  • You will need to use a build scan or one of the cmd-line techniques in the link in the second comment to work out what – tim_yates Dec 02 '21 at 13:59

0 Answers0