Skip to content

Commit 70713a0

Browse files
authored
Remove deprecated AbstractArchiveTask Gradle API usages (#58657) (#58894)
* Fix deprecated ArchiveTask configurations
1 parent 965f77f commit 70713a0

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

buildSrc/src/testKit/thirdPartyAudit/sample_jars/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
["0.0.1", "0.0.2"].forEach { v ->
1212
["elasticsearch", "other"].forEach { p ->
1313
tasks.register("dummy-${p}-${v}", Jar) {
14-
destinationDir = file("${buildDir}/testrepo/org/${p}/gradle/dummy-io/${v}/")
14+
destinationDirectory = file("${buildDir}/testrepo/org/${p}/gradle/dummy-io/${v}/")
1515
archiveFileName = "dummy-io-${v}.jar"
1616
from sourceSets.main.output
1717
include "**/TestingIO.class"

distribution/archives/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ tasks.register('buildOssNoJdkWindowsZip', Zip) {
147147
}
148148

149149
Closure commonTarConfig = {
150-
extension = 'tar.gz'
150+
archiveExtension = 'tar.gz'
151151
compression = Compression.GZIP
152152
dirMode 0755
153153
fileMode 0644

distribution/packages/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ Closure commonPackageConfig(String type, boolean oss, boolean jdk, String archit
124124
// Follow elasticsearch's file naming convention
125125
String jdkString = jdk ? "" : "no-jdk-"
126126
String prefix = "${architecture == 'aarch64' ? 'aarch64-' : ''}${oss ? 'oss-' : ''}${jdk ? '' : 'no-jdk-'}${type}"
127-
destinationDir = file("${prefix}/build/distributions")
127+
destinationDirectory = file("${prefix}/build/distributions")
128128

129129
// SystemPackagingTask overrides default archive task convention mappings, but doesn't provide a setter so we have to override the convention mapping itself
130-
conventionMapping.archiveFile = { objects.fileProperty().fileValue(file("${destinationDir}/${packageName}-${project.version}-${jdkString}${archString}.${type}")) }
130+
conventionMapping.archiveFile = { objects.fileProperty().fileValue(file("${destinationDirectory.get()}/${packageName}-${project.version}-${jdkString}${archString}.${type}")) }
131131

132132
String packagingFiles = "build/packaging/${oss ? 'oss-' : ''}${jdk ? '' : 'no-jdk-'}${type}"
133133

@@ -333,7 +333,7 @@ Closure commonDebConfig(boolean oss, boolean jdk, String architecture) {
333333
customFields['License'] = 'Elastic-License'
334334
}
335335

336-
version = project.version.replace('-', '~')
336+
archiveVersion = project.version.replace('-', '~')
337337
packageGroup 'web'
338338

339339
// versions found on oldest supported distro, centos-6

modules/lang-painless/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ task apiJavadoc(type: Javadoc) {
6868
}
6969

7070
task apiJavadocJar(type: Jar) {
71-
classifier = 'apiJavadoc'
71+
archiveClassifier = 'apiJavadoc'
7272
from apiJavadoc
7373
}
7474

0 commit comments

Comments
 (0)