Package net.kyori.indra.git.internal
Class IndraGitService
java.lang.Object
net.kyori.indra.git.internal.IndraGitService
- All Implemented Interfaces:
AutoCloseable,org.gradle.api.services.BuildService<IndraGitService.Parameters>,org.gradle.tooling.events.OperationCompletionListener
public abstract class IndraGitService
extends Object
implements org.gradle.api.services.BuildService<IndraGitService.Parameters>, AutoCloseable, org.gradle.tooling.events.OperationCompletionListener
A build service providing the most relevant git repository for any project in the build.
- Since:
- 2.0.0
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.services.BuildService
getParameters
-
Field Details
-
SERVICE_NAME
- See Also:
-
-
Constructor Details
-
IndraGitService
public IndraGitService()
-
-
Method Details
-
git
@Nullable public @Nullable org.eclipse.jgit.api.Git git(File projectDir, @NotNull @NotNull String displayName) Get the git repository for this build.If this project is not managed by git, this will return
null.- Parameters:
projectDir- the project directory to locate a git repo indisplayName- the display name for the context being queried- Returns:
- the build's git repository.
- Since:
- 2.0.0
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
onFinish
public void onFinish(org.gradle.tooling.events.FinishEvent finishEvent) - Specified by:
onFinishin interfaceorg.gradle.tooling.events.OperationCompletionListener
-