File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
buildSrc/src/main/java/org/springframework/security/kerberos/gradle Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 2121import org .gradle .api .Action ;
2222import org .gradle .api .Plugin ;
2323import org .gradle .api .Project ;
24+ import org .gradle .api .Task ;
2425
2526import io .github .gradlenexus .publishplugin .NexusPublishExtension ;
2627import io .github .gradlenexus .publishplugin .NexusPublishPlugin ;
@@ -42,5 +43,12 @@ public void execute(NexusRepository nexusRepository) {
4243 });
4344 nexusPublishing .getConnectTimeout ().set (Duration .ofMinutes (3 ));
4445 nexusPublishing .getClientTimeout ().set (Duration .ofMinutes (3 ));
46+
47+ // Ensure release build automatically closes and releases staging repository
48+ Task finalizeDeployArtifacts = project .task ("finalizeDeployArtifacts" );
49+ if (Utils .isRelease (project ) && project .hasProperty ("ossrhUsername" )) {
50+ Task closeAndReleaseOssrhStagingRepository = project .getTasks ().findByName ("closeAndReleaseOssrhStagingRepository" );
51+ finalizeDeployArtifacts .dependsOn (closeAndReleaseOssrhStagingRepository );
52+ }
4553 }
4654}
You can’t perform that action at this time.
0 commit comments