public final class PackagesPublishing
extends java.lang.Object
publishGithub.| Modifier and Type | Method and Description |
|---|---|
static void |
apply(org.gradle.api.Project project,
Logger logger,
PublishExtension publishExtension,
Repositories repositories,
Credentials credentials)
Registers the GitHub Packages repository on every project of this build that publishes
something, and makes
publishGithub publish to each, when
publishGithub.packages.enabled is set. |
public static void apply(org.gradle.api.Project project,
Logger logger,
PublishExtension publishExtension,
Repositories repositories,
Credentials credentials)
publishGithub publish to each, when
publishGithub.packages.enabled is set.project - the project the block was written in, whose publishGithub does the work.logger - receives diagnostic output.publishExtension - the extension supplying the destination and the owner/repo fallback.repositories - the client used to read the git remote when the owner/repo is not stated.credentials - supplies the token the repository authenticates with.artifact { modules = true }. The destination is registered through
withPlugin("maven-publish") rather than by applying that plugin: whether the
destination is enabled is only known after the build script has run, and applying
maven-publish from inside afterEvaluate is the one point at which it can no
longer add its own publish tasks.