Browse Source

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
pull/30915/head
Yanming Zhou 3 years ago committed by Sam Brannen
parent
commit
56b60120fe
  1. 6
      spring-core/spring-core.gradle

6
spring-core/spring-core.gradle

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

Loading…
Cancel
Save