File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
plugins/repository-hdfs/hadoop-client-api Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1+ import org.gradle.api.file.ArchiveOperations
2+
13apply plugin : ' elasticsearch.java'
24
35sourceSets {
@@ -27,16 +29,23 @@ def patchTask = tasks.register("patchClasses", JavaExec) {
2729 outputs. dir(outputDir)
2830 classpath = sourceSets. patcher. runtimeClasspath
2931 mainClass = ' org.elasticsearch.hdfs.patch.HdfsClassPatcher'
32+ def thejar = configurations. thejar
3033 doFirst {
31- args(configurations . thejar. singleFile, outputDir. get(). asFile)
34+ args(thejar. singleFile, outputDir. get(). asFile)
3235 }
3336}
3437
38+
39+ interface InjectedArchiveOps {
40+ @Inject ArchiveOperations getArchiveOperations ()
41+ }
42+
3543tasks. named(' jar' ). configure {
3644 dependsOn(configurations. thejar)
37-
45+ def injected = project. objects. newInstance(InjectedArchiveOps )
46+ def thejar = configurations. thejar
3847 from(patchTask)
39- from({ project . zipTree(configurations . thejar. singleFile) }) {
48+ from({ injected . getArchiveOperations() . zipTree( thejar. singleFile) }) {
4049 eachFile {
4150 if (outputDir. get(). file(it. relativePath. pathString). asFile. exists()) {
4251 it. exclude()
You can’t perform that action at this time.
0 commit comments