Skip to content

Commit

Permalink
Sync buildSrc from main
Browse files Browse the repository at this point in the history
- Relates to changes in #1001 for gradle 8.4 upgrade
- There were additional changes for publish to work
  • Loading branch information
jvalkeal committed Feb 22, 2024
1 parent 465c604 commit 9f88129
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void apply(Project project) {
// 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
Expand All @@ -62,8 +62,8 @@ void apply(Project project) {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public void apply(Project project) {
PluginManager pluginManager = project.getPluginManager();
pluginManager.apply(MavenPublishPlugin.class);
pluginManager.apply(PublishLocalPlugin.class);
// docsarchive needs to be created before artifactory
// conventions are used
project.getConfigurations().create("docsarchive");
new ArtifactoryConventions().apply(project);
Javadoc apiTask = createApiTask(project);
Zip zipTask = createZipTask(project);
Expand All @@ -65,7 +68,9 @@ private Zip createZipTask(Project project) {
});
});

project.getArtifacts().add("archives", zipTask);
// since gradle 8.3 archives configuration started to fail
// so using custom configuration name
project.getArtifacts().add("docsarchive", zipTask);
return zipTask;
}

Expand Down

0 comments on commit 9f88129

Please sign in to comment.