From d0bc101bb6fa20dddde2b05de104d77d179541fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Prante?= Date: Tue, 16 Nov 2021 15:11:29 +0100 Subject: [PATCH] clean up for gradle plugin publishing --- gradle-plugin-docker/build.gradle | 31 ++++++++++--------------------- gradle-plugin-git/build.gradle | 13 +++++++------ gradle-plugin-rpm/build.gradle | 14 +++++++------- gradle.properties | 1 - 4 files changed, 24 insertions(+), 35 deletions(-) diff --git a/gradle-plugin-docker/build.gradle b/gradle-plugin-docker/build.gradle index 19bcb90..aa8c30a 100644 --- a/gradle-plugin-docker/build.gradle +++ b/gradle-plugin-docker/build.gradle @@ -1,27 +1,15 @@ plugins { id 'java-gradle-plugin' id 'groovy' - id 'com.gradle.plugin-publish' version '0.17.0' + id 'com.gradle.plugin-publish' version '0.18.0' } -ext { - user = 'jprante' - name = 'gradle-plugin-docker' - description = 'Docker support in a Gradle plugin' - inceptionYear = '2016' - url = 'https://github.com/' + user + '/' + name - scmUrl = 'https://github.com/' + user + '/' + name - scmConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git' - scmDeveloperConnection = 'scm:git:ssh://git@github.com:' + user + '/' + name + '.git' - issueManagementSystem = 'Github' - issueManagementUrl = ext.scmUrl + '/issues' - licenseName = 'The Apache License, Version 2.0' - licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' -} +apply plugin: 'groovy' +apply plugin: 'java-gradle-plugin' +apply plugin: 'com.gradle.plugin-publish' dependencies { api gradleApi() - implementation "org.codehaus.groovy:groovy-all:${project.property('groovy.version')}" testImplementation gradleTestKit() } @@ -35,10 +23,6 @@ compileTestGroovy { targetCompatibility = JavaVersion.VERSION_11 } -validatePlugins { - failOnWarning = false -} - gradlePlugin { plugins { dockerPlugin { @@ -50,6 +34,11 @@ gradlePlugin { if (project.hasProperty('gradle.publish.key')) { pluginBundle { + mavenCoordinates { + groupId = "org.xbib.gradle.plugin" + artifactId = "gradle-plugin-docker" + version = project.version + } website = 'https://github.com/jprante/gradle-plugins' vcsUrl = 'https://github.com/jprante/gradle-plugins' plugins { @@ -58,7 +47,7 @@ if (project.hasProperty('gradle.publish.key')) { version = project.version description = 'Docker plugin for build and push by Dockerfile' displayName = 'Docker Plugin for build and push by Dockerfile' - tags = ['gradle', 'docker'] + tags = ['docker'] } } } diff --git a/gradle-plugin-git/build.gradle b/gradle-plugin-git/build.gradle index f5d4f5c..d90f08f 100644 --- a/gradle-plugin-git/build.gradle +++ b/gradle-plugin-git/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java-gradle-plugin' id 'groovy' - id 'com.gradle.plugin-publish' version '0.17.0' + id 'com.gradle.plugin-publish' version '0.18.0' } apply plugin: 'groovy' @@ -26,10 +26,6 @@ compileTestGroovy { targetCompatibility = JavaVersion.VERSION_11 } -validatePlugins { - failOnWarning = false -} - gradlePlugin { plugins { gitPlugin { @@ -41,6 +37,11 @@ gradlePlugin { if (project.hasProperty('gradle.publish.key')) { pluginBundle { + mavenCoordinates { + groupId = "org.xbib.gradle.plugin" + artifactId = "gradle-plugin-git" + version = project.version + } website = 'https://github.com/jprante/gradle-plugins' vcsUrl = 'https://github.com/jprante/gradle-plugins' plugins { @@ -49,7 +50,7 @@ if (project.hasProperty('gradle.publish.key')) { version = project.version description = 'Git client plugin based on JGit' displayName = 'Git client plugin based on JGit' - tags = ['gradle', 'plugin', 'git'] + tags = ['git'] } } } diff --git a/gradle-plugin-rpm/build.gradle b/gradle-plugin-rpm/build.gradle index 2b23902..50963d1 100644 --- a/gradle-plugin-rpm/build.gradle +++ b/gradle-plugin-rpm/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java-gradle-plugin' id 'groovy' - id 'com.gradle.plugin-publish' version '0.17.0' + id 'com.gradle.plugin-publish' version '0.18.0' } apply plugin: 'groovy' @@ -24,11 +24,6 @@ compileTestGroovy { targetCompatibility = JavaVersion.VERSION_11 } -validatePlugins { - // disable warning as failures because gradle plugin does not recognize @Delegate tag - failOnWarning = false -} - gradlePlugin { plugins { rpmPlugin { @@ -40,6 +35,11 @@ gradlePlugin { if (project.hasProperty('gradle.publish.key')) { pluginBundle { + mavenCoordinates { + groupId = "org.xbib.gradle.plugin" + artifactId = "gradle-plugin-rpm" + version = project.version + } website = 'https://github.com/jprante/gradle-plugins' vcsUrl = 'https://github.com/jprante/gradle-plugins' plugins { @@ -48,7 +48,7 @@ if (project.hasProperty('gradle.publish.key')) { version = project.version description = 'Java implementation for RPM packaging' displayName = 'Java implementation for RPM packaging' - tags = ['gradle', 'plugin', 'rpm'] + tags = [ 'rpm' ] } } } diff --git a/gradle.properties b/gradle.properties index dca77e5..9dfd08a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,6 @@ group = 'org.xbib.gradle.plugin' name = 'gradle-plugins' version = 0.0.1 -groovy.version = 3.0.9 gradle.wrapper.version = 7.3 groovy-git.version = 2.0.1 rpm.version = 2.1.0