Skip to content

Commit f18e4a3

Browse files
andseljsvd
andauthored
Fix build script to run with Gradle 7 (#432)
Update the Gradle wrapper used to version 7.2 and fixed build.gradle script. Co-authored-by: João Duarte <[email protected]>
1 parent b9953b6 commit f18e4a3

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-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 [#432](https://github.com/logstash-plugins/logstash-input-beats/pull/432)
3+
14
## 6.2.1
25
- Fix: LS failing with `ssl_peer_metadata => true` [#431](https://github.com/logstash-plugins/logstash-input-beats/pull/431)
36
- [DOC] described `executor_threads` configuration parameter [#421](https://github.com/logstash-plugins/logstash-input-beats/pull/421)

build.gradle

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ repositories {
2121
}
2222

2323
dependencies {
24-
testCompile 'junit:junit:4.12'
25-
testCompile 'org.hamcrest:hamcrest-library:1.3'
26-
testCompile 'org.apache.logging.log4j:log4j-core:2.11.1'
27-
compile 'io.netty:netty-all:4.1.65.Final'
28-
compile 'org.javassist:javassist:3.24.0-GA'
29-
compile "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
30-
compile "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
31-
compile "com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}"
32-
compile "com.fasterxml.jackson.module:jackson-module-afterburner:${jacksonVersion}"
33-
compile 'org.apache.logging.log4j:log4j-api:2.11.1'
24+
testImplementation 'junit:junit:4.12'
25+
testImplementation 'org.hamcrest:hamcrest-library:1.3'
26+
testImplementation 'org.apache.logging.log4j:log4j-core:2.11.1'
27+
implementation 'io.netty:netty-all:4.1.65.Final'
28+
implementation 'org.javassist:javassist:3.24.0-GA'
29+
implementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
30+
implementation "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
31+
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonDatabindVersion}"
32+
implementation "com.fasterxml.jackson.module:jackson-module-afterburner:${jacksonVersion}"
33+
implementation 'org.apache.logging.log4j:log4j-api:2.11.1'
3434

3535
}
3636

@@ -56,12 +56,14 @@ task run (type: JavaExec, dependsOn: classes){
5656
}
5757

5858
task generateGemJarRequiresFile {
59+
configurations.implementation.canBeResolved = true
60+
5961
doLast {
6062
File jars_file = file('lib/logstash-input-beats_jars.rb')
6163
jars_file.newWriter().withWriter { w ->
6264
w << "# AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.\n\n"
6365
w << "require \'jar_dependencies\'\n"
64-
configurations.runtime.allDependencies.each {
66+
configurations.implementation.allDependencies.each {
6567
w << "require_jar(\'${it.group}\', \'${it.name}\', \'${it.version}\')\n"
6668
}
6769
w << "require_jar(\'${project.group}\', \'${project.name}\', \'${project.version}\')\n"
@@ -72,8 +74,8 @@ task generateGemJarRequiresFile {
7274
task vendor {
7375
doLast {
7476
String vendorPathPrefix = "vendor/jar-dependencies"
75-
configurations.runtime.allDependencies.each { dep ->
76-
File f = configurations.runtime.filter { it.absolutePath.contains("${dep.group}/${dep.name}/${dep.version}") }.singleFile
77+
configurations.implementation.allDependencies.each { dep ->
78+
File f = configurations.implementation.filter { it.absolutePath.contains("${dep.group}/${dep.name}/${dep.version}") }.singleFile
7779
String groupPath = dep.group.replaceAll('\\.', '/')
7880
File newJarFile = file("${vendorPathPrefix}/${groupPath}/${dep.name}/${dep.version}/${dep.name}-${dep.version}.jar")
7981
newJarFile.mkdirs()
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)