diff --git a/src/main/groovy/nebula/plugin/responsible/NebulaResponsiblePlugin.groovy b/src/main/groovy/nebula/plugin/responsible/NebulaResponsiblePlugin.groovy index 621c4a0..8420b3e 100644 --- a/src/main/groovy/nebula/plugin/responsible/NebulaResponsiblePlugin.groovy +++ b/src/main/groovy/nebula/plugin/responsible/NebulaResponsiblePlugin.groovy @@ -22,7 +22,9 @@ class NebulaResponsiblePlugin implements Plugin { this.project = project // Publishing - project.plugins.apply(MavenPublishPlugin) + if (isBuildingSomething(project)) { + project.plugins.apply(MavenPublishPlugin) + } project.plugins.apply(JavadocJarPlugin) project.plugins.apply(SourceJarPlugin) @@ -43,4 +45,9 @@ class NebulaResponsiblePlugin implements Plugin { testTask.testLogging.exceptionFormat = 'full' } } + + private boolean isBuildingSomething(Project project) { + def isParentProject = project.rootProject.subprojects.any { it.parent == project } + return !isParentProject + } } \ No newline at end of file