From 4c414b9281a49d674bba3d157b858b38721e27e8 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 25 Jun 2025 17:07:41 +0100 Subject: [PATCH] Tolerate Gradle 9's change of archive entry ordering --- .../bundling/AbstractBootArchiveIntegrationTests.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java index fc8d61d98a3..3a379b6364e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveIntegrationTests.java @@ -243,8 +243,14 @@ abstract class AbstractBootArchiveIntegrationTests { .filter((entry) -> !entry.isDirectory()) .map(JarEntry::getName) .filter((name) -> name.startsWith(this.libPath)); - assertThat(libEntryNames).containsExactly(this.libPath + "two-1.0.jar", - this.libPath + "commons-io-2.19.0.jar"); + if (this.gradleBuild.gradleVersionIsLessThan("9.0.0-rc-1")) { + assertThat(libEntryNames).containsExactly(this.libPath + "two-1.0.jar", + this.libPath + "commons-io-2.19.0.jar"); + } + else { + assertThat(libEntryNames).containsExactly(this.libPath + "commons-io-2.19.0.jar", + this.libPath + "two-1.0.jar"); + } } }