public class PackagesExtension
extends java.lang.Object
github {
packages {
from "my-org/libs"
from("my-org/core") { group = "com.example" }
}
}
dependencies {
implementation "com.example:common:1.0.0"
testImplementation testFixtures("com.example:common:1.0.0")
}
from is repeatable, and each entry becomes an ordinary Maven repository, so
dependencies resolved through it are ordinary Gradle dependencies with full metadata.
githubImplementation "OWNER:REPO:TAG"
triple names a repository and a tag, while a package is addressed by group, artifact and version,
and one repository can hold several artifacts under a group its own name never appears in.
Reusing the triple would have to guess that mapping.| Constructor and Description |
|---|
PackagesExtension() |
| Modifier and Type | Method and Description |
|---|---|
PackageSourceEntry |
from(java.lang.String repository)
Resolves dependencies from a repository's GitHub Packages registry.
|
void |
from(java.lang.String repository,
org.gradle.api.Action<? super PackageSourceEntry> action)
Resolves dependencies from a repository's GitHub Packages registry, configured by the given
Gradle action.
|
void |
from(java.lang.String repository,
groovy.lang.Closure<?> closure)
Resolves dependencies from a repository's GitHub Packages registry, configured by the given
Groovy closure.
|
java.util.List<PackageSourceEntry> |
getSources() |
public java.util.List<PackageSourceEntry> getSources()
from entry, in declaration order.public PackageSourceEntry from(java.lang.String repository)
repository - the repository, as "owner/repo".public void from(java.lang.String repository,
org.gradle.api.Action<? super PackageSourceEntry> action)
repository - the repository, as "owner/repo".action - action that configures the entry.public void from(java.lang.String repository,
groovy.lang.Closure<?> closure)
repository - the repository, as "owner/repo".closure - closure that configures the entry.