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

Introduce the grgit-service plugin #354

Merged
merged 2 commits into from
Feb 8, 2022
Merged

Introduce the grgit-service plugin #354

merged 2 commits into from
Feb 8, 2022

Conversation

ajoberstar
Copy link
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

abelom commented Feb 8, 2022

thank you!!! but #355 :)

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.

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