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

Use BuildService as provider of Grgit #160

Closed
wants to merge 3 commits into from
Closed

Conversation

petertrr
Copy link

This pull request introduces a BuildService, which serves as a provider of Grgit instance. It replaces grgit-gradle plugin and instead of using Grgit from extension property and closing it in buildFinished listener allows gradle to manage it's lifecycle and close when closing build service. This addresses the issue reported at ajoberstar/grgit#333 and ajoberstar/grgit#322, but since grgit is no longer actively maintained (as per readme), I decided to implement this change here.

The biggest downside is that build services have been introduced only in Gradle 6.1, so this would require raising minimal supported version, which is represented in updated tests.

I'm using reckon in my projects and really like the results and appreciate the work, that has been done. I would really like to hear feedback on this and adjust my changes accordingly.

@kibotu
Copy link

kibotu commented Aug 22, 2021

any updates on this one? my team would also appreciate this :)

@petertrr
Copy link
Author

any updates on this one? my team would also appreciate this :)

Hey @kibotu , until @ajoberstar reviews this, you can try this change from jitpack.io. By adding a repo maven("https://jitpack.io") and changing dependency to implementation("com.github.ajoberstar.reckon:reckon-gradle:PR160-SNAPSHOT") inside buildSrc/build.gradle.kts or buildscript block, for example.

I tested this manually myself, but would very much like to hear feedback from others. Maybe, if others confirm that it's working, it could speed up review process too :)

# Conflicts:
#	reckon-gradle/build.gradle
#	reckon-gradle/gradle/dependency-locks/compileClasspath.lockfile
#	reckon-gradle/gradle/dependency-locks/runtimeClasspath.lockfile
#	reckon-gradle/gradle/dependency-locks/testCompileClasspath.lockfile
#	reckon-gradle/gradle/dependency-locks/testRuntimeClasspath.lockfile
@ajoberstar
Copy link
Owner

As of 0.14.0 both grgit and reckon are configuration cache safe and leverage BuildService to provide the repositories.

@ajoberstar ajoberstar closed this Feb 11, 2022
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

Successfully merging this pull request may close these issues.

3 participants