Skip to content

Commit b9c012c

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

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
@@ -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
@@ -167,9 +167,10 @@ tasks.named("processTestResources").configure {
167167
from(project(xpackModule('core')).file('src/test/resources'))
168168
}
169169

170-
artifacts {
170+
171+
tasks.named('assemble').configure {
171172
// normal es plugins do not publish the jar but we need to since users need it for extensions
172-
archives tasks.named("jar")
173+
dependsOn tasks.named('jar')
173174
}
174175

175176
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
@@ -59,6 +59,6 @@ def restResourcesZip = tasks.register('restResourcesZip', Zip) {
5959
}
6060
}
6161

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

0 commit comments

Comments
 (0)