public class JarSourceEntry
extends java.lang.Object
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 and Description |
|---|
JarSourceEntry() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders() |
java.lang.String |
getInto() |
java.lang.String |
getSha256() |
java.lang.String |
getUrl() |
void |
header(java.lang.String name,
java.lang.String value)
Adds a single request header (for example, an auth token) to send with the download.
|
void |
setInto(java.lang.String into) |
void |
setSha256(java.lang.String sha256) |
void |
setUrl(java.lang.String url) |
public void setUrl(java.lang.String url)
url - the exact URL to download a jar from.public java.lang.String getUrl()
public void setSha256(java.lang.String sha256)
sha256 - the expected SHA-256 of the downloaded jar, hex-encoded, or null to skip
integrity verification.public java.lang.String getSha256()
public void setInto(java.lang.String into)
into - the native Gradle configuration the downloaded jar is added to. Defaults to
"implementation".public java.lang.String getInto()
public void header(java.lang.String name,
java.lang.String value)
name - the header name.value - the header value.public java.util.Map<java.lang.String,java.lang.String> getHeaders()
header(String, String), in declaration order; never
null, empty when none were added.