public class ArtifactEntry
extends java.lang.Object
Configure multiple entries inside a publishGithub { artifacts { } } block:
publishGithub {
artifacts {
artifact {
jar = file("build/libs/my-lib.jar")
classifier = "" // default artifact — uploaded as repo.jar
}
artifact {
jar = file("build/libs/my-lib-api.jar")
classifier = "api" // uploaded as repo-api.jar
}
}
}
A blank or null classifier produces the asset name repo.jar.
Any other classifier produces repo-CLASSIFIER.jar.
| Constructor and Description |
|---|
ArtifactEntry() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClassifier() |
java.io.File |
getJar() |
boolean |
isModules() |
void |
setClassifier(java.lang.String classifier)
Sets the classifier that distinguishes this artifact from others in the same release.
|
void |
setJar(java.io.File jar)
Sets the JAR file to upload for this artifact.
|
void |
setModules(boolean modules)
When true, this entry expands to one asset per subproject (
<repo>-<module>.jar) instead of
uploading getJar(); the jar and classifier fields are then ignored. |
public void setJar(java.io.File jar)
jar - the JAR filepublic java.io.File getJar()
public void setClassifier(java.lang.String classifier)
repo.jar).classifier - the classifier string, e.g. "api", "fat"public java.lang.String getClassifier()
public void setModules(boolean modules)
<repo>-<module>.jar) instead of
uploading getJar(); the jar and classifier fields are then ignored. Lets a
multi-module library publish all its modules alongside any regular classified jars in one release.modules - whether this entry represents all subproject modulespublic boolean isModules()