gradle-git-version icon indicating copy to clipboard operation
gradle-git-version copied to clipboard

JDK 1.8 fails?

Open APN-Pucky opened this issue 2 years ago • 6 comments

What happened?

I am running JDK 1.8 and a version bump seems to break previous 0.12.3 behavior (https://github.com/APN-Pucky/GitJarUpdate/pull/3).

 An exception occurred applying plugin request [id: 'com.palantir.git-version', version: '0.15.0']
> Failed to apply plugin [id 'com.palantir.git-version']
   > Could not create plugin of type 'GitVersionPlugin'.
      > Could not generate a decorated class for class com.palantir.gradle.gitversion.GitVersionPlugin.
         > org/eclipse/jgit/lib/Repository 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

What did you want to happen?

This version should also work with 1.8 JDK since

https://github.com/palantir/gradle-git-version/blob/30fd324dd5ec6e24d07e17ae6c6bbf1662097854/build.gradle#L68

or am I missing something?

APN-Pucky avatar Jul 30 '22 21:07 APN-Pucky

I'm also having the same issue. I downgraded to 0.13.0 version and it worked for me.

luccas-freitas avatar Aug 09 '22 17:08 luccas-freitas

What happened?

I am running JDK 1.8 and a version bump seems to break previous 0.12.3 behavior (APN-Pucky/GitJarUpdate#3).

 An exception occurred applying plugin request [id: 'com.palantir.git-version', version: '0.15.0']
> Failed to apply plugin [id 'com.palantir.git-version']
   > Could not create plugin of type 'GitVersionPlugin'.
      > Could not generate a decorated class for class com.palantir.gradle.gitversion.GitVersionPlugin.
         > org/eclipse/jgit/lib/Repository 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

What did you want to happen?

This version should also work with 1.8 JDK since

https://github.com/palantir/gradle-git-version/blob/30fd324dd5ec6e24d07e17ae6c6bbf1662097854/build.gradle#L68

or am I missing something?

This is sourceCompatibility, not targetCompatibility :(.

kpodvolecky avatar Aug 22 '22 06:08 kpodvolecky

I'm also having the same issue. I downgraded to 0.13.0 version and it worked for me.

yep, works on JDK8, but doesn't work with latest gradle :(

kpodvolecky avatar Aug 22 '22 06:08 kpodvolecky

This looks like an issue with jgit where we automatically pulled in new jgit version that no longer supports java 8. While it's unfortunate I think it's reasonable to say java 11 would be the minimum version. Personally I'm surprised this plugin stayed as long as it has on java 8

robert3005 avatar Sep 05 '22 16:09 robert3005

Looks like this is a side effect of https://github.com/palantir/gradle-git-version/pull/581 which bumped jgit to 6.x to support submodules properly

robert3005 avatar Sep 05 '22 16:09 robert3005