Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Introduce the grgit-service plugin#354

Merged
ajoberstar merged 2 commits intomainfrom
config-cache
Feb 8, 2022
Merged

Introduce the grgit-service plugin#354
ajoberstar merged 2 commits intomainfrom
config-cache

Conversation

@ajoberstar
Copy link
Copy Markdown
Owner

@ajoberstar ajoberstar commented Feb 8, 2022

The org.ajoberstar.grgit-service is the new underlying behavior for org.ajoberstar.grgit, building on the work from @runningcode and @abelom in #353.

The service plugin only registers a GrgitService, but leaves it up to plugins (or builds) to grab the service and try to use it.

Alternatively, the existing grgit plugin applies the service plugin and eagerly resolves it to provide the prior grgit extension property.

A breaking change is that any project which wants to access a pre-initialized grgit instance now must apply the grgit plugin. This reduces the amount of cross-project logic going on, which Gradle has discouraged for a while (but can be hard to avoid).

Some plugins may have use cases to register their own GrgitService instances that are used for their own behavior (the gradle-git-publish plugin will take advantage of this once it upgrades to use grgit 5).

All projects using grgit-service plugin will share a Grgit instance, which is also controlled to avoid concurrent access. (That doesn't affect other plugins/builds registering their own GrgitService instances.)

Fixes #322.

runningcode and others added 2 commits February 7, 2022 11:43
The org.ajoberstar.grgit-service is the new underlying behavior for
org.ajoberstar.grgit, building on the work from @runningcode and
@abelom.

The service plugin only registers a GrgitService, but leaves it up to
plugins (or builds) to grab the service and try to use it.

Alternatively, the existing grgit plugin applies the service plugin and
eagerly resolves it to provide the prior grgit extension property.

A breaking change is that any project which wants to access a
pre-initialized grgit instance now must apply the grgit plugin. This
reduces the amount of cross-project logic going on, which Gradle has
discouraged for a while (but can be hard to avoid).

Some plugins may have use cases to register their own GrgitService
instances that are used for their own behavior (the gradle-git-publish
plugin will take advantage of this once it upgrades to use grgit 5).

All projects using grgit-service plugin will share a Grgit instance,
which is also controlled to avoid concurrent access. (That doesn't
affect other plugins/builds registering their own GrgitService
instances).
@abelom
Copy link
Copy Markdown

abelom commented Feb 8, 2022

thank you!!! but #355 :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gradle 6.6-rc-1 --configuration-cache > registration of listener on 'Gradle.buildFinished' is unsupported

3 participants