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 and makes
publishGithub publish to it, 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 it, when
publishGithub.packages.enabled is set.project - the project whose publications are published.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.withPlugin("maven-publish") rather
than by applying that plugin here. Whether the destination is enabled is only known after
the build script has run, and applying a plugin from inside afterEvaluate is the one
point at which maven-publish can no longer add its own publish tasks. Every project
that has something to publish already applies it, so requiring it costs nothing and an
absent one is reported rather than worked around.