Stop using deprecated AbstractArchiveTask.archivePath in Gradle build

This commit addresses the following warning in the build.

The AbstractArchiveTask.archivePath property has been deprecated. This
is scheduled to be removed in Gradle 9.0. Please use the archiveFile
property instead. See
https://docs.gradle.org/8.1.1/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:archivePath
for more details.

Closes gh-30697
This commit is contained in:
Yanming Zhou 2023-06-20 16:30:33 +08:00 committed by Sam Brannen
parent 1364a179a9
commit 56b60120fe
1 changed files with 3 additions and 3 deletions

View File

@ -100,12 +100,12 @@ jar {
manifest.attributes["Dependencies"] = "jdk.unsupported" // for WildFly (-> Objenesis 3.2)
dependsOn javapoetRepackJar
from(zipTree(javapoetRepackJar.archivePath)) {
from(zipTree(javapoetRepackJar.archiveFile)) {
include "org/springframework/javapoet/**"
}
dependsOn objenesisRepackJar
from(zipTree(objenesisRepackJar.archivePath)) {
from(zipTree(objenesisRepackJar.archiveFile)) {
include "org/springframework/objenesis/**"
}
}
@ -137,7 +137,7 @@ eclipse {
def pattern = ~/\/spring-\w+-repack-/
entries.forEach {
if (pattern.matcher(it.path).find()) {
def sourcesJar = it.path.replace('.jar', '-sources.jar');
def sourcesJar = it.path.replace('.jar', '-sources.jar')
it.sourcePath = fileReference(file(sourcesJar))
}
}