Class SourcesExtension
java.lang.Object
io.github.intisy.gradle.github.plugin.extension.SourcesExtension
Extension for declaring dependencies resolved from an arbitrary git host or a direct jar URL,
as opposed to a GitHub release (see
github { }).
sources {
git {
url = "https://gitlab.com/me/lib.git"
ref = "main"
into = "implementation"
}
jar {
url = "https://nexus.internal/libs/foo-1.0.jar"
header "Authorization", "Bearer ${myToken}"
sha256 = "..."
into = "implementation"
}
}
Both git { } and jar { } are repeatable.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgit(groovy.lang.Closure<?> closure) Declares a git repository dependency, configured by the given Groovy closure.voidgit(org.gradle.api.Action<? super GitSourceEntry> action) Declares a git repository dependency, configured by the given Gradle action.voidjar(groovy.lang.Closure<?> closure) Declares a direct jar URL dependency, configured by the given Groovy closure.voidjar(org.gradle.api.Action<? super JarSourceEntry> action) Declares a direct jar URL dependency, configured by the given Gradle action.
-
Constructor Details
-
SourcesExtension
public SourcesExtension()
-
-
Method Details
-
getGitSources
- Returns:
- every declared
git { }entry, in declaration order.
-
getJarSources
- Returns:
- every declared
jar { }entry, in declaration order.
-
git
Declares a git repository dependency, configured by the given Gradle action.- Parameters:
action- action that configures aGitSourceEntry.
-
git
public void git(groovy.lang.Closure<?> closure) Declares a git repository dependency, configured by the given Groovy closure. Supports Gradle Groovy DSL usage:git { ... }- Parameters:
closure- closure that configures aGitSourceEntry.
-
jar
Declares a direct jar URL dependency, configured by the given Gradle action.- Parameters:
action- action that configures aJarSourceEntry.
-
jar
public void jar(groovy.lang.Closure<?> closure) Declares a direct jar URL dependency, configured by the given Groovy closure. Supports Gradle Groovy DSL usage:jar { ... }- Parameters:
closure- closure that configures aJarSourceEntry.
-