Skip to content

Commit 8e06b29

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

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
@@ -630,22 +630,6 @@ subprojects {
630630
}
631631
}
632632

633-
['archives:windows-zip',
634-
'archives:darwin-tar',
635-
'archives:darwin-aarch64-tar',
636-
'archives:linux-aarch64-tar',
637-
'archives:linux-tar',
638-
'archives:integ-test-zip',
639-
'packages:rpm', 'packages:deb',
640-
'packages:aarch64-rpm', 'packages:aarch64-deb',
641-
].forEach { subName ->
642-
Project subproject = project("${project.path}:${subName}")
643-
Configuration configuration = configurations.create(subproject.name)
644-
dependencies {
645-
"${configuration.name}" project(path: subproject.path, configuration:'default')
646-
}
647-
}
648-
649633
// This artifact makes it possible for other projects to pull
650634
// in the final log4j2.properties configuration, as it appears in the
651635
// archive distribution.

x-pack/plugin/ml/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ def mlCppVersion(){
106106
(project.version + "-SNAPSHOT") : project.version;
107107
}
108108

109-
artifacts {
110-
// normal es plugins do not publish the jar but we need to since users need it for extensions
111-
archives tasks.named("jar")
109+
110+
tasks.named('assemble').configure {
111+
dependsOn tasks.named('jar')
112112
}
113113

114114
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
@@ -56,6 +56,6 @@ def restResourcesZip = tasks.register('restResourcesZip', Zip) {
5656
}
5757
}
5858

59-
artifacts {
60-
archives restResourcesZip
59+
tasks.named('assemble').configure {
60+
dependsOn restResourcesZip
6161
}

0 commit comments

Comments
 (0)