Delay until PublishAllJavaComponentsPlugin

This commit is contained in:
Rob Winch 2021-05-17 23:53:01 -05:00
parent 03924951a2
commit 05dd69395d
1 changed files with 3 additions and 3 deletions

View File

@ -58,11 +58,11 @@ public class SpringSigningPlugin implements Plugin<Project> {
} else {
signing.useInMemoryPgpKeys(signingKey, signingPassword);
}
project.getPlugins().withType(PublishingPlugin.class).all(new Action<PublishingPlugin>() {
project.getPlugins().withType(PublishAllJavaComponentsPlugin.class).all(new Action<PublishAllJavaComponentsPlugin>() {
@Override
public void execute(PublishingPlugin publishingPlugin) {
public void execute(PublishAllJavaComponentsPlugin publishingPlugin) {
PublishingExtension publishing = project.getExtensions().findByType(PublishingExtension.class);
Publication maven = publishing.getPublications().getByName("maven");
Publication maven = publishing.getPublications().getByName("mavenJava");
signing.sign(maven);
}
});