api / org.gradle.api.publish.ivy / IvyPublication / getArtifacts

getArtifacts

abstract fun getArtifacts(): IvyArtifactSet

The complete set of artifacts for this publication.

Setting this property will clear any previously added artifacts and create artifacts from the specified sources. Each supplied source is interpreted as per #artifact(Object). For example, to exclude the dependencies declared by a component and instead use a custom set of artifacts:

 apply plugin: "java" apply plugin: "ivy-publish" task sourceJar(type: Jar) { classifier "source" } publishing { publications { ivy(IvyPublication) { from components.java artifacts = ["my-custom-jar.jar", sourceJar] } } } 

Return
the artifacts.