Skip to content

Commit cb2c2ac

Browse files
committed
[Gradle] Avoid usage of archives configuration (#133526)
* [Gradle] Avoid usage of archives configuration This will be deprecated in later Gradle versions * Remove unused wiring in distribution project * minor tweak
1 parent d36c368 commit cb2c2ac

File tree

4 files changed

+8
-23
lines changed

4 files changed

+8
-23
lines changed

distribution/build.gradle

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -647,22 +647,6 @@ subprojects {
647647
}
648648
}
649649

650-
['archives:windows-zip',
651-
'archives:darwin-tar',
652-
'archives:darwin-aarch64-tar',
653-
'archives:linux-aarch64-tar',
654-
'archives:linux-tar',
655-
'archives:integ-test-zip',
656-
'packages:rpm', 'packages:deb',
657-
'packages:aarch64-rpm', 'packages:aarch64-deb',
658-
].forEach { subName ->
659-
Project subproject = project("${project.path}:${subName}")
660-
Configuration configuration = configurations.create(subproject.name)
661-
dependencies {
662-
"${configuration.name}" project(path: subproject.path, configuration:'default')
663-
}
664-
}
665-
666650
// This artifact makes it possible for other projects to pull
667651
// in the final log4j2.properties configuration, as it appears in the
668652
// archive distribution.

x-pack/plugin/ml/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ def mlCppVersion(){
111111
(project.version + "-SNAPSHOT") : project.version;
112112
}
113113

114-
artifacts {
115-
// normal es plugins do not publish the jar but we need to since users need it for extensions
116-
archives tasks.named("jar")
114+
115+
tasks.named('assemble').configure {
116+
dependsOn tasks.named('jar')
117117
}
118118

119119
tasks.register("extractNativeLicenses", Copy) {

x-pack/plugin/security/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,10 @@ tasks.named("processTestResources").configure {
173173
from(project(xpackModule('core')).file('src/test/resources'))
174174
}
175175

176-
artifacts {
176+
177+
tasks.named('assemble').configure {
177178
// normal es plugins do not publish the jar but we need to since users need it for extensions
178-
archives tasks.named("jar")
179+
dependsOn tasks.named('jar')
179180
}
180181

181182
tasks.named("dependencyLicenses").configure {

x-pack/rest-resources-zip/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ def restResourcesZip = tasks.register('restResourcesZip', Zip) {
5858
}
5959
}
6060

61-
artifacts {
62-
archives restResourcesZip
61+
tasks.named('assemble').configure {
62+
dependsOn restResourcesZip
6363
}

0 commit comments

Comments
 (0)