Use custom configuration name for docs zip
- With gradle 8.3 artifactory publish started to fail with archives configation. Change that to docsarchive which is created in a RootPlugin. - Relates #821
This commit is contained in:
@@ -48,7 +48,7 @@ public class ArtifactoryConventions {
|
||||
// bom is not a java project so plugin doesn't
|
||||
// add defaults for publications.
|
||||
aTask.publications("mavenJava");
|
||||
aTask.publishConfigs("archives");
|
||||
aTask.publishConfigs("docsarchive");
|
||||
|
||||
// plugin is difficult to work with, use this hack
|
||||
// to set props before task does its real work
|
||||
@@ -62,8 +62,8 @@ public class ArtifactoryConventions {
|
||||
propsMap.put("zip.type", "docs");
|
||||
ArtifactSpec spec = ArtifactSpec.builder()
|
||||
.artifactNotation("*:*:*:*@zip")
|
||||
// archives is manually set for zip in root plugin
|
||||
.configuration("archives")
|
||||
// docsarchive is manually set for zip in root plugin
|
||||
.configuration("docsarchive")
|
||||
.properties(propsMap)
|
||||
.build();
|
||||
artifactSpecs.add(spec);
|
||||
|
||||
@@ -65,7 +65,10 @@ class RootPlugin implements Plugin<Project> {
|
||||
});
|
||||
});
|
||||
|
||||
project.getArtifacts().add("archives", zipTask);
|
||||
// since gradle 8.3 archives configuration started to fail
|
||||
// so using custom configuration name
|
||||
project.getConfigurations().create("docsarchive");
|
||||
project.getArtifacts().add("docsarchive", zipTask);
|
||||
return zipTask;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user