Class JarSourceEntry
java.lang.Object
io.github.intisy.gradle.github.plugin.extension.JarSourceEntry
A single
sources { jar { } } entry: a direct jar URL to download and add to a native
Gradle configuration, with no repository or git host involved.
sources {
jar {
url = "https://nexus.internal/libs/foo-1.0.jar"
header "Authorization", "Bearer ${myToken}"
sha256 = "..." // optional integrity check
into = "implementation" // native configuration; optional, default "implementation"
}
}
-
Constructor Details
-
JarSourceEntry
public JarSourceEntry()
-
-
Method Details
-
setUrl
- Parameters:
url- the exact URL to download a jar from.
-
getUrl
- Returns:
- the exact URL to download a jar from, or null if not set.
-
setSha256
- Parameters:
sha256- the expected SHA-256 of the downloaded jar, hex-encoded, or null to skip integrity verification.
-
getSha256
- Returns:
- the expected SHA-256 of the downloaded jar, hex-encoded, or null if not set.
-
setInto
- Parameters:
into- the native Gradle configuration the downloaded jar is added to. Defaults to"implementation".
-
getInto
- Returns:
- the native Gradle configuration the downloaded jar is added to.
-
header
Adds a single request header (for example, an auth token) to send with the download.- Parameters:
name- the header name.value- the header value.
-
getHeaders
- Returns:
- every header added via
header(String, String), in declaration order; never null, empty when none were added.
-