Package net.kyori.indra.git.internal
Class IndraGitService
- java.lang.Object
-
- net.kyori.indra.git.internal.IndraGitService
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.gradle.api.services.BuildService<IndraGitService.Parameters>
public abstract class IndraGitService extends java.lang.Object implements org.gradle.api.services.BuildService<IndraGitService.Parameters>, java.lang.AutoCloseable
A build service providing the most relevant git repository for any project in the build.- Since:
- 2.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceIndraGitService.Parameters
-
Constructor Summary
Constructors Constructor Description IndraGitService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()@Nullable org.eclipse.jgit.api.Gitgit(java.io.File projectDir, @NotNull java.lang.String displayName)Get the git repository for this build.
-
-
-
Method Detail
-
git
@Nullable public @Nullable org.eclipse.jgit.api.Git git(java.io.File projectDir, @NotNull @NotNull java.lang.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 interfacejava.lang.AutoCloseable
-
-