Class GitSourceEntry

java.lang.Object
io.github.intisy.gradle.github.plugin.extension.GitSourceEntry

public class GitSourceEntry extends Object
A single sources { git { } } entry: an arbitrary git repository to clone, build, and add to a native Gradle configuration.
 sources {
     git {
         url = "https://gitlab.com/me/lib.git"
         ref = "main"                 // branch, tag or commit; optional, default the remote's default branch
         into = "implementation"      // native configuration; optional, default "implementation"
     }
 }
 
  • Constructor Details

    • GitSourceEntry

      public GitSourceEntry()
  • Method Details

    • setUrl

      public void setUrl(String url)
      Parameters:
      url - the exact URL to clone from; any git host, not just github.com.
    • getUrl

      public String getUrl()
      Returns:
      the exact URL to clone from, or null if not set.
    • setRef

      public void setRef(String ref)
      Parameters:
      ref - the branch, tag, or commit to build, or null for the remote's default branch.
    • getRef

      public String getRef()
      Returns:
      the branch, tag, or commit to build, or null for the remote's default branch.
    • setInto

      public void setInto(String into)
      Parameters:
      into - the native Gradle configuration the built jar is added to. Defaults to "implementation".
    • getInto

      public String getInto()
      Returns:
      the native Gradle configuration the built jar is added to.