From 177f9a493703132bda4a0e7e8178775f0388f116 Mon Sep 17 00:00:00 2001 From: GitHub Action <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 13:58:42 +0000 Subject: [PATCH] build: Fix publication settings --- README.adoc | 2 +- VERSION | 2 +- .../enforcer-gradle-plugin.gradle | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 43ff13ce..a9fb22cd 100644 --- a/README.adoc +++ b/README.adoc @@ -3,7 +3,7 @@ :project-owner: kordamp :project-name: enforcer-gradle-plugin :project-group: org.kordamp.gradle -:project-version: 0.13.0 +:project-version: 0.14.0 :plugin-id: {project-group}.enforcer image:http://img.shields.io/github/actions/workflow/status/{project-owner}/{project-name}/early-access.yml?branch=master&logo=github&label=Build["Build Status", link="https://github.com/{project-owner}/{project-name}/actions"] diff --git a/VERSION b/VERSION index 85a7357f..f869b7fa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.14.0-SNAPSHOT +0.13.0-SNAPSHOT diff --git a/plugins/enforcer-gradle-plugin/enforcer-gradle-plugin.gradle b/plugins/enforcer-gradle-plugin/enforcer-gradle-plugin.gradle index 68d4f6c7..478d2d53 100644 --- a/plugins/enforcer-gradle-plugin/enforcer-gradle-plugin.gradle +++ b/plugins/enforcer-gradle-plugin/enforcer-gradle-plugin.gradle @@ -79,3 +79,29 @@ integrationTest { ].collect { "'${it.destinationDirectory.get().asFile.absolutePath}'" } .join(',') } + +afterEvaluate { + def publishPluginJar = project.tasks.findByName('publishPluginJar') + def publishTask = project.tasks.findByName('publishMainPublicationToMavenLocal') + if (publishTask && publishPluginJar) publishTask.dependsOn(publishPluginJar) + publishTask = tasks.findByName('publishMainPublicationToLocalSnapshotRepository') + if (publishTask && publishPluginJar) publishTask.dependsOn(publishPluginJar) + publishTask = tasks.findByName('publishMainPublicationToLocalReleaseRepository') + if (publishTask && publishPluginJar) publishTask.dependsOn(publishPluginJar) + + def publishPluginJavaDocsJar = project.tasks.findByName('publishPluginJavaDocsJar') + publishTask = project.tasks.findByName('publishMainPublicationToMavenLocal') + if (publishTask && publishPluginJavaDocsJar) publishTask.dependsOn(publishPluginJavaDocsJar) + publishTask = tasks.findByName('publishMainPublicationToLocalSnapshotRepository') + if (publishTask && publishPluginJavaDocsJar) publishTask.dependsOn(publishPluginJavaDocsJar) + publishTask = tasks.findByName('publishMainPublicationToLocalReleaseRepository') + if (publishTask && publishPluginJavaDocsJar) publishTask.dependsOn(publishPluginJavaDocsJar) + + def publishPluginGroovyDocsJar = project.tasks.findByName('publishPluginGroovyDocsJar') + publishTask = project.tasks.findByName('publishMainPublicationToMavenLocal') + if (publishTask && publishPluginGroovyDocsJar) publishTask.dependsOn(publishPluginGroovyDocsJar) + publishTask = tasks.findByName('publishMainPublicationToLocalSnapshotRepository') + if (publishTask && publishPluginGroovyDocsJar) publishTask.dependsOn(publishPluginGroovyDocsJar) + publishTask = tasks.findByName('publishMainPublicationToLocalReleaseRepository') + if (publishTask && publishPluginGroovyDocsJar) publishTask.dependsOn(publishPluginGroovyDocsJar) +} \ No newline at end of file