Я изучаю Gradle, когда я читаю документацию https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:artifacts(groovy.lang.Closure),, там говорится, что закрытие делегировано ArtifactHandler
, однако я не могу понять, почему:
configurations {
//declaring new configuration that will be used to associate with artifacts
schema
}
task schemaJar(type: Jar) {
//some imaginary task that creates a jar artifact with the schema
}
//associating the task that produces the artifact with the configuration
artifacts {
//configuration name and the task:
schema schemaJar
}
особенно:
schema schemaJar
Как Gradle (или Groovy) вызывает этот метод:
PublishArtifact add(String configurationName, Object artifactNotation)