Skip to content

Commit aa4dbc7

Browse files
committed
revert to backwards compatible
1 parent 28081e5 commit aa4dbc7

File tree

8 files changed

+18
-35
lines changed

8 files changed

+18
-35
lines changed

jib-build-plan/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ publishing {
4848
release {
4949
tagTemplate = 'v$version-build-plan'
5050
git {
51-
requireBranch.set(/^build-plan-release-v\d+.*$/)
51+
requireBranch = /^build-plan-release-v\d+.*$/ //regex
5252
}
5353
}
5454
/* RELEASE */

jib-cli/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ release {
6161
'com.google.cloud.tools:jib-plugins-common',
6262
]
6363
git {
64-
requireBranch.set(/^cli-release-v\d+.*$/)
64+
requireBranch = /^cli-release-v\d+.*$/ //regex
6565
}
6666
}
6767

jib-core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ publishing {
7171
release {
7272
tagTemplate = 'v$version-core'
7373
git {
74-
requireBranch.set(/^core-release-v\d+.*$/)
74+
requireBranch = /^core-release-v\d+.*$/ //regex
7575
}
7676
}
7777
/* RELEASE */

jib-gradle-plugin-extension-api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ publishing {
4444
release {
4545
tagTemplate = 'v$version-gradle-extension'
4646
git {
47-
requireBranch.set(/^gradle-extension-release-v\d+.*$/)
47+
requireBranch = /^gradle-extension-release-v\d+.*$/ //regex
4848
}
4949
}
5050
/* RELEASE */

jib-gradle-plugin/build.gradle

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -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
7065
release {
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+
8282
gradlePlugin {
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-
}
11093
tasks.publishPlugins.dependsOn build
11194
/* RELEASE */
11295

jib-maven-plugin-extension-api/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ publishing {
4444
release {
4545
tagTemplate = 'v$version-maven-extension'
4646
git {
47-
requireBranch.set(/^maven-extension-release-v\d+.*$/)
47+
requireBranch = /^maven-extension-release-v\d+.*$/ //regex
4848
}
4949
}
5050
/* RELEASE */

jib-maven-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ release {
7171
'com.google.cloud.tools:jib-plugins-common',
7272
]
7373
git {
74-
requireBranch.set(/^maven-release-v\d+.*$/)
74+
requireBranch = /^maven-release-v\d+.*$/ //regex
7575
}
7676
}
7777
/* RELEASE */

jib-plugins-extension-common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ publishing {
3838
release {
3939
tagTemplate = 'v$version-extension-common'
4040
git {
41-
requireBranch.set(/^extension-common-release-v\d+.*$/)
41+
requireBranch = /^extension-common-release-v\d+.*$/ //regex
4242
}
4343
}
4444
/* RELEASE */

0 commit comments

Comments
 (0)