@@ -3,14 +3,9 @@ buildscript {
33 gradlePluginPortal()
44 }
55 dependencies {
6- // Use version compatible with current Gradle version
7- if (GradleVersion . current() >= GradleVersion . version(' 7.0' )) {
8- classpath ' net.researchgate:gradle-release:3.1.0'
9- classpath ' com.gradle.publish:plugin-publish-plugin:1.2.0'
10- } else {
11- classpath ' net.researchgate:gradle-release:2.8.1'
12- classpath ' com.gradle.publish:plugin-publish-plugin:0.21.0'
13- }
6+ // Use Gradle 6.9.2 compatible versions
7+ classpath ' net.researchgate:gradle-release:2.8.1'
8+ classpath ' com.gradle.publish:plugin-publish-plugin:0.21.0'
149 }
1510}
1611
@@ -68,17 +63,22 @@ dependencies {
6863/* RELEASE */
6964// Prepare release
7065release {
71- tagTemplate = ' v$version-gradle'
66+ tagTemplate = ' v$version-gradle-plugin '
7267 ignoredSnapshotDependencies = [
7368 ' com.google.cloud.tools:jib-core' ,
7469 ' com.google.cloud.tools:jib-plugins-common' ,
7570 ]
7671 git {
77- requireBranch. set( / ^gradle-release-v\d +.*$/ )
72+ requireBranch = / ^gradle-release-v\\ d+.*$/ // regex
7873 }
7974}
8075// Gradle Plugin Portal releases
81- // Try Gradle 7+ syntax first, fall back to Gradle 6 if properties don't exist
76+ pluginBundle {
77+ website = ' https://github.com/GoogleContainerTools/jib/'
78+ vcsUrl = ' https://github.com/GoogleContainerTools/jib/'
79+ tags = [' google' , ' java' , ' containers' , ' docker' , ' kubernetes' , ' microservices' ]
80+ }
81+
8282gradlePlugin {
8383 testSourceSets sourceSets. integrationTest, sourceSets. test
8484 plugins {
@@ -90,23 +90,6 @@ gradlePlugin {
9090 }
9191 }
9292}
93- try {
94- // Gradle 7+ with plugin-publish 1.x
95- gradlePlugin {
96- website = ' https://github.com/GoogleContainerTools/jib/'
97- vcsUrl = ' https://github.com/GoogleContainerTools/jib/'
98- }
99- gradlePlugin. plugins. jibPlugin {
100- tags = [' google' , ' java' , ' containers' , ' docker' , ' kubernetes' , ' microservices' ]
101- }
102- } catch (Exception e) {
103- // Gradle 6.x with plugin-publish 0.x
104- pluginBundle {
105- website = ' https://github.com/GoogleContainerTools/jib/'
106- vcsUrl = ' https://github.com/GoogleContainerTools/jib/'
107- tags = [' google' , ' java' , ' containers' , ' docker' , ' kubernetes' , ' microservices' ]
108- }
109- }
11093tasks. publishPlugins. dependsOn build
11194/* RELEASE */
11295
0 commit comments