Failed to Apply Plugin 'Com. Gorylenko. Gradle-Git-Properties

Currently working on a gradle project am not familiar with gradle so it's a learning curve.

am encountering below error which seems to be clear but confusing me.

Caused by: java.lang.UnsupportedClassVersionError: org/eclipse/jgit/api/errors/JGitInternalException 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

I have Java 8 installed in my PC and below is my gradle.build file

1   ext {
2       springBootVersion = '2.2.11.RELEASE'
3   }
4   repositories {
5       mavenCentral()
6       maven {
7           url ""
8       }
9   }
10  dependencies {
11      classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
12      classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-RC3'
13      classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:2.2.4" //TODO investigate
14      classpath "com.diffplug.spotless:spotless-plugin-gradle:5.12.5"
15  }
16}
17
18 apply plugin: 'java'
19 apply plugin: 'idea'
20 apply plugin: 'org.springframework.boot'
21 apply plugin: 'io.spring.dependency-management'
22 apply plugin: 'war'
23 apply plugin: 'org.junit.platform.gradle.plugin'
24 apply plugin: 'com.gorylenko.gradle-git-properties' // TODO investigate
25 apply plugin: 'com.diffplug.spotless'
26
27 group = 'io.sndk7'
28 version = '0.0.1'
29 sourceCompatibility = 1.8

it's failing on line number 24 while trying to apply the plugin which is added as a dependence on line 13
0

1 Answer

The git plugin you're using relies on jgit

Jgit has moved to be Java 11+ so won't work on Java 8

Shows workarounds to get it to work on Java 8

Or... You could migrate your project to Java 11+

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest