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
    Modifier and Type
    Class
    Description
    static interface 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    @Nullable org.eclipse.jgit.api.Git
    git(File projectDir, @NotNull String displayName)
    Get the git repository for this build.
    void
    onFinish(org.gradle.tooling.events.FinishEvent finishEvent)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.services.BuildService

    getParameters
  • Field Details

  • 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 in
      displayName - the display name for the context being queried
      Returns:
      the build's git repository.
      Since:
      2.0.0
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • onFinish

      public void onFinish(org.gradle.tooling.events.FinishEvent finishEvent)
      Specified by:
      onFinish in interface org.gradle.tooling.events.OperationCompletionListener