@@ -24,7 +24,7 @@ dependencies {
24
24
testImplementation ' org.hamcrest:hamcrest-library:1.3'
25
25
testImplementation " org.apache.logging.log4j:log4j-core:${ log4jVersion} "
26
26
27
- implementation ' io.netty:netty-all:4.1.65 .Final'
27
+ implementation ' io.netty:netty-all:4.1.68 .Final'
28
28
compileOnly " org.apache.logging.log4j:log4j-api:${ log4jVersion} " // provided by Logstash
29
29
}
30
30
@@ -51,9 +51,12 @@ task generateGemJarRequiresFile {
51
51
jars_file. newWriter(). withWriter { w ->
52
52
w << " # AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.\n\n "
53
53
w << " require \' jar_dependencies\'\n "
54
- configurations. runtimeClasspath. allDependencies. each {
55
- w << " require_jar(\' ${ it.group} \' , \' ${ it.name} \' , \' ${ it.version} \' )\n "
56
- }
54
+ configurations. runtimeClasspath. resolvedConfiguration. resolvedArtifacts
55
+ .collect {it. owner}
56
+ .sort { it. group }
57
+ .each {
58
+ w << " require_jar(\' ${ it.group} \' , \' ${ it.name} \' , \' ${ it.version} \' )\n "
59
+ }
57
60
w << " require_jar(\' ${ project.group} \' , \' ${ project.name} \' , \' ${ project.version} \' )\n "
58
61
}
59
62
}
@@ -62,12 +65,14 @@ task generateGemJarRequiresFile {
62
65
task vendor {
63
66
doLast {
64
67
String vendorPathPrefix = " vendor/jar-dependencies"
65
- configurations. runtimeClasspath. allDependencies. each { dep ->
66
- File f = configurations. runtimeClasspath. filter { it. absolutePath. contains(" ${ dep.group} /${ dep.name} /${ dep.version} " ) }. singleFile
67
- String groupPath = dep. group. replaceAll(' \\ .' , ' /' )
68
- File newJarFile = file(" ${ vendorPathPrefix} /${ groupPath} /${ dep.name} /${ dep.version} /${ dep.name} -${ dep.version} .jar" )
69
- newJarFile. mkdirs()
70
- Files . copy(f. toPath(), newJarFile. toPath(), REPLACE_EXISTING )
68
+ configurations. runtimeClasspath. resolvedConfiguration. resolvedArtifacts. each { artifact ->
69
+ ModuleVersionIdentifier dep = artifact. owner
70
+ File f = artifact. file
71
+
72
+ String groupPath = dep. group. replaceAll(' \\ .' , ' /' )
73
+ File newJarFile = file(" ${ vendorPathPrefix} /${ groupPath} /${ dep.name} /${ dep.version} /${ dep.name} -${ dep.version} .jar" )
74
+ newJarFile. mkdirs()
75
+ Files . copy(f. toPath(), newJarFile. toPath(), REPLACE_EXISTING )
71
76
}
72
77
String projectGroupPath = project. group. replaceAll(' \\ .' , ' /' )
73
78
File projectJarFile = file(" ${ vendorPathPrefix} /${ projectGroupPath} /${ project.name} /${ project.version} /${ project.name} -${ project.version} .jar" )
0 commit comments