Skip to content

Commit

Permalink
Merge pull request #383 from jdaugherty/7.0.x
Browse files Browse the repository at this point in the history
Fix profile publish plugin
  • Loading branch information
jdaugherty authored Dec 24, 2024
2 parents 5da451e + 077cb3e commit 7cee872
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,9 @@ class GrailsProfilePublishGradlePlugin extends GrailsPublishGradlePlugin {
}
})
}

@Override
protected validateProjectPublishable(Project project) {
// no-op
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<? extends Task> publishTask = project.tasks.named("publish")

Expand Down Expand Up @@ -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.")
}
Expand Down

0 comments on commit 7cee872

Please sign in to comment.