public final class GitHubSourceBuilds extends java.lang.Object implements SourceBuilds
SourceBuilder to the GitHub-specific SourceBuilds
capability by resolving owner/repo to a github.com clone URL before
delegating, so the source-build strategy behaves exactly as it did before SourceBuilder took an explicit clone URL.| Constructor and Description |
|---|
GitHubSourceBuilds(GitHub gitHub,
SourceBuilder sourceBuilder) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.io.File> |
buildFromGit(java.lang.String cloneUrl,
java.lang.String ref,
java.lang.String gradleDir,
java.util.List<java.lang.String> modules)
Builds a multi-module git repository from source, taking one jar per named module.
|
java.io.File |
buildFromSource(java.lang.String owner,
java.lang.String repo,
java.lang.String branch,
java.lang.String commitSha)
Builds a GitHub repository from source, identified by owner and repo.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildFromGitpublic GitHubSourceBuilds(GitHub gitHub, SourceBuilder sourceBuilder)
gitHub - resolves the github.com clone URL (SSH or HTTPS) for a given owner/repo.sourceBuilder - builds and caches the jar once the clone URL is known.public java.io.File buildFromSource(java.lang.String owner,
java.lang.String repo,
java.lang.String branch,
java.lang.String commitSha)
throws java.io.IOException
SourceBuildsbuildFromSource in interface SourceBuildsowner - the repository owner.repo - the repository name.branch - the branch to clone or pull, or null for the current/default branch.commitSha - the commit to build, or null to use the branch's latest commit.java.io.IOException - if the clone/pull, checkout, or build itself fails.public java.util.List<java.io.File> buildFromGit(java.lang.String cloneUrl,
java.lang.String ref,
java.lang.String gradleDir,
java.util.List<java.lang.String> modules)
throws java.io.IOException
SourceBuildsbuildFromGit in interface SourceBuildscloneUrl - the exact URL to clone from.ref - the branch, tag, or commit to build, or null for the remote's default branch.gradleDir - the gradle project directory relative to the checkout root, or null when the
build lives at the root. A repository whose gradle root is a subdirectory is
otherwise unbuildable, because the wrapper is not where the checkout is.modules - the gradle module names whose jars to take, or empty for the single jar the
root project produces.modules order, built only when not
already cached.java.io.IOException - if the clone, checkout, or build itself fails.