For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

getArtifacts

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. For example, to exclude the dependencies declared by a component and instead use a custom set of artifacts:

plugins {
    id 'java'
    id 'ivy-publish'
}

task sourceJar(type: Jar) {
  archiveClassifier = "source"
}

publishing {
  publications {
    ivy(IvyPublication) {
      from components.java
      artifacts = ["my-custom-jar.jar", sourceJar]
    }
  }
}

Return

the artifacts.

Since

1.5