Skip to content

Commit 40c8558

Browse files
authored
Fix build script to run with Gradle 7 (#75)
Update the Gradle wrapper used to version 7.2 and fixed build.gradle script.
1 parent 61740c7 commit 40c8558

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Unreleased
2+
- Fix: update to Gradle 7 [#75](https://github.com/logstash-plugins/logstash-filter-useragent/pull/75)
3+
14
## 3.3.1
25
- Fix: invalid 3.3.0 release which did not package correctly [#71](https://github.com/logstash-plugins/logstash-filter-useragent/pull/71)
36

build.gradle

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING
2525
* under the License.
2626
*/
2727
apply plugin: "java"
28-
apply plugin: 'maven'
28+
apply plugin: 'maven-publish'
2929
apply plugin: "distribution"
3030
apply plugin: "idea"
3131

@@ -37,13 +37,13 @@ sourceCompatibility = JavaVersion.VERSION_1_8
3737
buildscript {
3838
repositories {
3939
mavenCentral()
40-
jcenter()
40+
gradlePluginPortal()
4141
}
4242

4343
dependencies {
4444
classpath group: 'org.jruby', name: 'jruby-complete', version: "9.2.11.0"
45-
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
46-
classpath 'de.undercouch:gradle-download-task:3.2.0'
45+
classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
46+
classpath 'de.undercouch:gradle-download-task:4.0.4'
4747
}
4848
}
4949

@@ -85,20 +85,21 @@ task downloadTestYaml(type: Download, overwrite: false) {
8585
dest buildDir.toPath().resolve('resources/test').toFile()
8686
}
8787

88-
task verifyYaml(type: Verify, dependsOn: [patchYaml]) {
88+
task verifyYaml(type: Verify, dependsOn: [patchYaml, processResources]) {
89+
inputs.file("${buildDir}/resources/main/regexes.yaml")
8990
src buildDir.toPath().resolve('resources/main/regexes.yaml').toFile()
9091
algorithm 'SHA1'
9192
checksum '5a8ea18a9c9153e83159b8662e3f6650fbca60a8' // after replacement
9293
}
9394

9495
dependencies {
95-
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
96-
compile group: 'org.yaml', name: 'snakeyaml', version: '1.18'
97-
compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
98-
testCompile group: 'junit', name: 'junit', version: '4.12'
99-
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
100-
testRuntime group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
101-
testRuntime group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
96+
implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
97+
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.18'
98+
implementation group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
99+
testImplementation group: 'junit', name: 'junit', version: '4.12'
100+
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
101+
testImplementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
102+
testImplementation group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
102103
}
103104

104105
test {
@@ -118,7 +119,7 @@ apply plugin: 'com.github.johnrengelman.shadow'
118119

119120
shadowJar {
120121
dependsOn 'verifyYaml'
121-
classifier = null
122+
archiveClassifier = null
122123
}
123124

124125
task vendor(dependsOn: shadowJar) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)