Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build script to run with Gradle 7 #145

Merged
merged 1 commit into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## Unreleased
- Fix: update to Gradle 7 [#145](https://github.com/logstash-plugins/logstash-input-http/pull/145)

## 3.4.2
- Docs: added `v8` as an acceptable value for `ecs_compatibility` [#142](https://github.com/logstash-plugins/logstash-input-http/pull/142)

Expand Down
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ repositories {
}

dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.apache.logging.log4j:log4j-core:2.11.1'
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
testImplementation 'org.apache.logging.log4j:log4j-core:2.11.1'

compile 'io.netty:netty-all:4.1.65.Final'
compile 'org.apache.logging.log4j:log4j-api:2.11.1'
implementation 'io.netty:netty-all:4.1.65.Final'
implementation 'org.apache.logging.log4j:log4j-api:2.11.1'
}

test {
Expand All @@ -33,13 +33,13 @@ test {
}
}

task run (type: JavaExec, dependsOn: classes){
task run (type: JavaExec, dependsOn: classes) {
// turn on or off ssl
if(project.hasProperty('providedargs')){
if (project.hasProperty('providedargs')) {
args(providedargs.split(','))
}
description = "Plugin testing"
main = "org.logstash.plugins.input.http.Runner"
mainClass = "org.logstash.plugins.input.http.Runner"
classpath = sourceSets.main.runtimeClasspath
}

Expand All @@ -49,7 +49,7 @@ task generateGemJarRequiresFile {
jars_file.newWriter().withWriter { w ->
w << "# AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.\n\n"
w << "require \'jar_dependencies\'\n"
configurations.runtime.allDependencies.each {
configurations.runtimeClasspath.allDependencies.each {
w << "require_jar(\'${it.group}\', \'${it.name}\', \'${it.version}\')\n"
}
w << "require_jar(\'${project.group}\', \'${project.name}\', \'${project.version}\')\n"
Expand All @@ -60,8 +60,8 @@ task generateGemJarRequiresFile {
task vendor {
doLast {
String vendorPathPrefix = "vendor/jar-dependencies"
configurations.runtime.allDependencies.each { dep ->
File f = configurations.runtime.filter { it.absolutePath.contains("${dep.group}/${dep.name}/${dep.version}") }.singleFile
configurations.runtimeClasspath.allDependencies.each { dep ->
File f = configurations.runtimeClasspath.filter { it.absolutePath.contains("${dep.group}/${dep.name}/${dep.version}") }.singleFile
String groupPath = dep.group.replaceAll('\\.', '/')
File newJarFile = file("${vendorPathPrefix}/${groupPath}/${dep.name}/${dep.version}/${dep.name}-${dep.version}.jar")
newJarFile.mkdirs()
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists