diff --git a/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfilePublishGradlePlugin.groovy b/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfilePublishGradlePlugin.groovy index 8ee4968d..b43ea349 100644 --- a/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfilePublishGradlePlugin.groovy +++ b/src/main/groovy/org/grails/gradle/plugin/profiles/GrailsProfilePublishGradlePlugin.groovy @@ -93,4 +93,9 @@ class GrailsProfilePublishGradlePlugin extends GrailsPublishGradlePlugin { } }) } + + @Override + protected validateProjectPublishable(Project project) { + // no-op + } } diff --git a/src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy b/src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy index fccf10b6..5332872b 100644 --- a/src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy +++ b/src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy @@ -217,10 +217,10 @@ Note: if project properties are used, the properties must be defined prior to ap } project.afterEvaluate { - validateProjectState(project) + validateProjectPublishable(project as Project) project.publishing { if (useMavenPublish) { - addMavenPublishValidations(project, mavenPublishUrl) + addMavenPublishValidations(project as Project, mavenPublishUrl) System.setProperty('org.gradle.internal.publish.checksums.insecure', true as String) repositories { maven { @@ -383,7 +383,7 @@ Note: if project properties are used, the properties must be defined prior to ap } } - private void addMavenPublishValidations(Project project, def mavenPublishUrl) { + protected void addMavenPublishValidations(Project project, def mavenPublishUrl) { project.plugins.withId(MAVEN_PUBLISH_PLUGIN_ID) { TaskProvider publishTask = project.tasks.named("publish") @@ -416,7 +416,7 @@ Note: if project properties are used, the properties must be defined prior to ap 'plugin' } - private validateProjectState(Project project) { + protected validateProjectPublishable(Project project) { if (!project.components) { throw new RuntimeException("Cannot apply Grails Publish Plugin. Project ${project.name} does not have any components to publish.") }