Package net.kyori.indra.git
Class QueryBranch<V>
java.lang.Object
net.kyori.indra.git.RepositoryValueSource<V,P>
net.kyori.indra.git.MappedRepositoryValueSource<I,V,RepositoryValueSource.Parameters>
net.kyori.indra.git.MappedRepositoryValueSource.Parameterless<org.eclipse.jgit.lib.Ref,V>
net.kyori.indra.git.QueryBranch<V>
- Type Parameters:
V- the value type
- All Implemented Interfaces:
org.gradle.api.provider.ValueSource<V,RepositoryValueSource.Parameters>
- Direct Known Subclasses:
QueryBranch.Name
public abstract class QueryBranch<V>
extends MappedRepositoryValueSource.Parameterless<org.eclipse.jgit.lib.Ref,V>
A
MappedRepositoryValueSource that obtains values from the current branch,
or null if the project is not in a git repository or is checked out to a detached HEAD.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classQueries thenameof the current branch ref.Nested classes/interfaces inherited from class net.kyori.indra.git.MappedRepositoryValueSource
MappedRepositoryValueSource.Parameterless<I,V> Nested classes/interfaces inherited from class net.kyori.indra.git.RepositoryValueSource
RepositoryValueSource.Parameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable org.eclipse.jgit.lib.RefgetRawValue(@NotNull org.eclipse.jgit.api.Git repository) Obtains the raw value from the repository.Methods inherited from class net.kyori.indra.git.MappedRepositoryValueSource
mapValue, obtainMethods inherited from class net.kyori.indra.git.RepositoryValueSource
obtainMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.provider.ValueSource
getParameters
-
Constructor Details
-
QueryBranch
public QueryBranch()
-
-
Method Details
-
getRawValue
@Nullable protected @Nullable org.eclipse.jgit.lib.Ref getRawValue(@NotNull @NotNull org.eclipse.jgit.api.Git repository) Description copied from class:MappedRepositoryValueSourceObtains the raw value from the repository.- Specified by:
getRawValuein classMappedRepositoryValueSource<org.eclipse.jgit.lib.Ref,V, RepositoryValueSource.Parameters> - Parameters:
repository- the git repository- Returns:
- the raw value, or
null
-