diff --git a/buildSrc/src/main/java/org/springframework/pulsar/gradle/SpringDocsModulePlugin.java b/buildSrc/src/main/java/org/springframework/pulsar/gradle/SpringDocsModulePlugin.java index 11885677..df484e9b 100644 --- a/buildSrc/src/main/java/org/springframework/pulsar/gradle/SpringDocsModulePlugin.java +++ b/buildSrc/src/main/java/org/springframework/pulsar/gradle/SpringDocsModulePlugin.java @@ -16,17 +16,23 @@ package org.springframework.pulsar.gradle; -import io.spring.gradle.convention.RepositoryConventionPlugin; import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.api.plugins.JavaLibraryPlugin; import org.gradle.api.plugins.JavaPlugin; import org.gradle.api.plugins.PluginManager; +import org.gradle.api.publish.maven.plugins.MavenPublishPlugin; import org.springframework.boot.gradle.JavaConventionsPlugin; import org.springframework.boot.gradle.optional.OptionalDependenciesPlugin; import org.springframework.pulsar.gradle.docs.asciidoc.AsciidoctorConventionsPlugin; -import org.springframework.pulsar.gradle.publish.SpringPublishPlugin; +import org.springframework.pulsar.gradle.publish.MavenPublishingConventionsPlugin; +import org.springframework.pulsar.gradle.publish.PublishArtifactsPlugin; +import org.springframework.pulsar.gradle.publish.PublishLocalPlugin; +import org.springframework.pulsar.gradle.publish.SpringSigningPlugin; + +import io.spring.gradle.convention.ArtifactoryPlugin; +import io.spring.gradle.convention.RepositoryConventionPlugin; /** * @author Rob Winch @@ -42,7 +48,12 @@ public void apply(final Project project) { pluginManager.apply(JavaLibraryPlugin.class); pluginManager.apply(JavaConventionsPlugin.class); pluginManager.apply(AsciidoctorConventionsPlugin.class); - pluginManager.apply(SpringPublishPlugin.class); + pluginManager.apply(MavenPublishPlugin.class); + pluginManager.apply(SpringSigningPlugin.class); + pluginManager.apply(MavenPublishingConventionsPlugin.class); + pluginManager.apply(PublishLocalPlugin.class); + pluginManager.apply(PublishArtifactsPlugin.class); + pluginManager.apply(ArtifactoryPlugin.class); pluginManager.apply(OptionalDependenciesPlugin.class); } } diff --git a/buildSrc/src/main/java/org/springframework/pulsar/gradle/SpringModulePlugin.java b/buildSrc/src/main/java/org/springframework/pulsar/gradle/SpringModulePlugin.java index b155cc0f..84544478 100644 --- a/buildSrc/src/main/java/org/springframework/pulsar/gradle/SpringModulePlugin.java +++ b/buildSrc/src/main/java/org/springframework/pulsar/gradle/SpringModulePlugin.java @@ -16,21 +16,46 @@ package org.springframework.pulsar.gradle; +import org.gradle.api.Plugin; import org.gradle.api.Project; +import org.gradle.api.plugins.JavaLibraryPlugin; +import org.gradle.api.plugins.JavaPlugin; import org.gradle.api.plugins.PluginManager; +import org.gradle.api.publish.maven.plugins.MavenPublishPlugin; +import org.springframework.boot.gradle.JavaConventionsPlugin; +import org.springframework.boot.gradle.optional.OptionalDependenciesPlugin; +import org.springframework.pulsar.gradle.docs.asciidoc.AsciidoctorConventionsPlugin; +import org.springframework.pulsar.gradle.publish.MavenPublishingConventionsPlugin; import org.springframework.pulsar.gradle.publish.PublishAllJavaComponentsPlugin; +import org.springframework.pulsar.gradle.publish.PublishArtifactsPlugin; +import org.springframework.pulsar.gradle.publish.PublishLocalPlugin; +import org.springframework.pulsar.gradle.publish.SpringSigningPlugin; + +import io.spring.gradle.convention.ArtifactoryPlugin; +import io.spring.gradle.convention.RepositoryConventionPlugin; /** * @author Chris Bono */ -public class SpringModulePlugin extends SpringDocsModulePlugin { +public class SpringModulePlugin implements Plugin { @Override public void apply(final Project project) { - super.apply(project); PluginManager pluginManager = project.getPluginManager(); - pluginManager.apply(PublishAllJavaComponentsPlugin.class); + pluginManager.apply(JavaPlugin.class); + pluginManager.apply(RepositoryConventionPlugin.class); + pluginManager.apply(JavaLibraryPlugin.class); + pluginManager.apply(JavaConventionsPlugin.class); + pluginManager.apply(AsciidoctorConventionsPlugin.class); + pluginManager.apply(MavenPublishPlugin.class); + pluginManager.apply(SpringSigningPlugin.class); + pluginManager.apply(MavenPublishingConventionsPlugin.class); + pluginManager.apply(PublishAllJavaComponentsPlugin.class); + pluginManager.apply(PublishLocalPlugin.class); + pluginManager.apply(PublishArtifactsPlugin.class); + pluginManager.apply(ArtifactoryPlugin.class); + pluginManager.apply(OptionalDependenciesPlugin.class); pluginManager.apply(JacocoConventionsPlugin.class); } } diff --git a/buildSrc/src/main/java/org/springframework/pulsar/gradle/publish/MavenPublishingConventionsPlugin.java b/buildSrc/src/main/java/org/springframework/pulsar/gradle/publish/MavenPublishingConventionsPlugin.java index 9edf5fd6..6550787c 100644 --- a/buildSrc/src/main/java/org/springframework/pulsar/gradle/publish/MavenPublishingConventionsPlugin.java +++ b/buildSrc/src/main/java/org/springframework/pulsar/gradle/publish/MavenPublishingConventionsPlugin.java @@ -59,7 +59,7 @@ * @author Mike Smithson * @author Chris Bono */ -class MavenPublishingConventionsPlugin implements Plugin { +public class MavenPublishingConventionsPlugin implements Plugin { @Override public void apply(Project project) { diff --git a/buildSrc/src/main/java/org/springframework/pulsar/gradle/publish/SpringPublishPlugin.java b/buildSrc/src/main/java/org/springframework/pulsar/gradle/publish/SpringPublishPlugin.java deleted file mode 100644 index d80b7175..00000000 --- a/buildSrc/src/main/java/org/springframework/pulsar/gradle/publish/SpringPublishPlugin.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.springframework.pulsar.gradle.publish; - -import io.spring.gradle.convention.ArtifactoryPlugin; -import org.gradle.api.Plugin; -import org.gradle.api.Project; -import org.gradle.api.plugins.PluginManager; -import org.gradle.api.publish.maven.plugins.MavenPublishPlugin; - -public class SpringPublishPlugin implements Plugin { - - @Override - public void apply(Project project) { - PluginManager pluginManager = project.getPluginManager(); - pluginManager.apply(MavenPublishPlugin.class); - pluginManager.apply(SpringSigningPlugin.class); - pluginManager.apply(MavenPublishingConventionsPlugin.class); - pluginManager.apply(PublishLocalPlugin.class); - pluginManager.apply(PublishArtifactsPlugin.class); - pluginManager.apply(ArtifactoryPlugin.class); - } - -}