Skip to content

Commit 818670d

Browse files
authored
[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 d96684a commit 818670d

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

632-
['archives:windows-zip',
633-
'archives:darwin-tar',
634-
'archives:darwin-aarch64-tar',
635-
'archives:linux-aarch64-tar',
636-
'archives:linux-tar',
637-
'archives:integ-test-zip',
638-
'packages:rpm', 'packages:deb',
639-
'packages:aarch64-rpm', 'packages:aarch64-deb',
640-
].forEach { subName ->
641-
Project subproject = project("${project.path}:${subName}")
642-
Configuration configuration = configurations.create(subproject.name)
643-
dependencies {
644-
"${configuration.name}" project(path: subproject.path, configuration:'default')
645-
}
646-
}
647-
648632
// This artifact makes it possible for other projects to pull
649633
// in the final log4j2.properties configuration, as it appears in the
650634
// 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
@@ -174,9 +174,10 @@ tasks.named("processTestResources").configure {
174174
from(project(xpackModule('core')).file('src/test/resources'))
175175
}
176176

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

182183
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)