@@ -18,12 +18,12 @@ repositories {
18
18
}
19
19
20
20
dependencies {
21
- testCompile ' junit:junit:4.12'
22
- testCompile ' org.hamcrest:hamcrest-library:1.3'
23
- testCompile ' org.apache.logging.log4j:log4j-core:2.11.1'
21
+ testImplementation ' junit:junit:4.12'
22
+ testImplementation ' org.hamcrest:hamcrest-library:1.3'
23
+ testImplementation ' org.apache.logging.log4j:log4j-core:2.11.1'
24
24
25
- compile ' io.netty:netty-all:4.1.65.Final'
26
- compile ' org.apache.logging.log4j:log4j-api:2.11.1'
25
+ implementation ' io.netty:netty-all:4.1.65.Final'
26
+ implementation ' org.apache.logging.log4j:log4j-api:2.11.1'
27
27
}
28
28
29
29
test {
@@ -33,23 +33,25 @@ test {
33
33
}
34
34
}
35
35
36
- task run (type : JavaExec , dependsOn : classes){
36
+ task run (type : JavaExec , dependsOn : classes) {
37
37
// turn on or off ssl
38
- if (project. hasProperty(' providedargs' )){
38
+ if (project. hasProperty(' providedargs' )) {
39
39
args(providedargs. split(' ,' ))
40
40
}
41
41
description = " Plugin testing"
42
- main = " org.logstash.plugins.input.http.Runner"
42
+ mainClass = " org.logstash.plugins.input.http.Runner"
43
43
classpath = sourceSets. main. runtimeClasspath
44
44
}
45
45
46
46
task generateGemJarRequiresFile {
47
+ configurations. implementation. canBeResolved = true
48
+
47
49
doLast {
48
50
File jars_file = file(' lib/logstash-input-http_jars.rb' )
49
51
jars_file. newWriter(). withWriter { w ->
50
52
w << " # AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.\n\n "
51
53
w << " require \' jar_dependencies\'\n "
52
- configurations. runtime . allDependencies. each {
54
+ configurations. implementation . allDependencies. each {
53
55
w << " require_jar(\' ${ it.group} \' , \' ${ it.name} \' , \' ${ it.version} \' )\n "
54
56
}
55
57
w << " require_jar(\' ${ project.group} \' , \' ${ project.name} \' , \' ${ project.version} \' )\n "
@@ -60,8 +62,8 @@ task generateGemJarRequiresFile {
60
62
task vendor {
61
63
doLast {
62
64
String vendorPathPrefix = " vendor/jar-dependencies"
63
- configurations. runtime . allDependencies. each { dep ->
64
- File f = configurations. runtime . filter { it. absolutePath. contains(" ${ dep.group} /${ dep.name} /${ dep.version} " ) }. singleFile
65
+ configurations. implementation . allDependencies. each { dep ->
66
+ File f = configurations. implementation . filter { it. absolutePath. contains(" ${ dep.group} /${ dep.name} /${ dep.version} " ) }. singleFile
65
67
String groupPath = dep. group. replaceAll(' \\ .' , ' /' )
66
68
File newJarFile = file(" ${ vendorPathPrefix} /${ groupPath} /${ dep.name} /${ dep.version} /${ dep.name} -${ dep.version} .jar" )
67
69
newJarFile. mkdirs()
0 commit comments