question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatibility with new grgit version

See original GitHub issue

Hi. We have encountered the following problem:

* What went wrong:
An exception occurred applying plugin request [id: 'org.ajoberstar.reckon', version: '0.13.0']
> Failed to apply plugin [class 'org.ajoberstar.grgit.gradle.GrgitServicePlugin']
   > Could not create plugin of type 'GrgitServicePlugin'.
      > Could not generate a decorated class for class org.ajoberstar.grgit.gradle.GrgitServicePlugin.
         > org/gradle/api/services/BuildServiceSpec

It seems like the 0.13 versions of reckon are not compatible with the new 5.0.0-rc1 version of grgit and the newly introduced grgit service-plugin (https://github.com/ajoberstar/grgit/pull/354). Our guess is that the missing version number at https://github.com/ajoberstar/reckon/blob/main/build.gradle.kts#L2 causes loading always the latest grgit version… in this case a release candidate.

Our workaround

buildscript {
  repositories {
    ...
  }
  dependencies {
    classpath ('org.ajoberstar.grgit:grgit-gradle:4.1.1') {
      force = true
    }
  }
}

Expected behavior/solution: Maybe it might a solution to use a fixed version of grgit inside of reckon… something like this:

plugins {
  id 'org.ajoberstar.grgit' version '4.1.1'
  ...
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ajoberstarcommented, Feb 8, 2022

Ugh 😫, 0.13.1 fixed the POM files on Maven Central, but for some reason Gradles publish plugin ignores the way maven-publish was configured and puts the ranges in the POM on the plugin portal. Will look into a fix later today.

2reactions
ajoberstarcommented, Feb 9, 2022

This should be fixed now in 0.13.2. It was caused by some interplay with com.gradle.plugin-publish, java-gradle-plugin, and dependency locking. I believe I’ve got a solution that’s more reliable now (which includes not publishing directly to the Gradle plugin portal anymore, and making use of the fact that the portal proxies Maven Central).

It may take up to an hour for the version to show up in Central (due to their syncing process), but it should resolve the issue you all encountered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatibility with latest version of grgit plugin #215 - GitHub
I've forked axion-release-plugin project and updated both the jgit version and grgit versions to the latest. Everything builds and all tests ...
Read more >
grgit NoClassDefFoundError - java - Stack Overflow
10) mismatch, I dug a little bit further: gradle-git-plugin commit for v0.7.0 specifies the Gradle version used (v1.11), so the build with v1.10 ......
Read more >
ajoberstar/grgit 2.0.0-milestone.2 on GitHub - NewReleases.io
New release ajoberstar/grgit version 2.0.0-milestone.2 on GitHub. ... be able to use the latest JGit), incorporate the org.ajoberstar.grgit Gradle plugin, ...
Read more >
build.gradle - platform/external/conscrypt - Git at Google
Add dependency for build script so we can access Git from our. // build script. id 'org.ajoberstar.grgit' version '2.2.1'. id 'net.ltgt.errorprone' version ......
Read more >
org.ajoberstar.grgit - Gradle Plugin Portal
Version 5.0.0-rc.3 (latest). Created 10 February 2022. The Groovy way to use Git. Other versions. 5.0.0-rc.2 · 5.0.0-rc.1 · 5.0.0-beta.1 · 4.1.1 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found