Include layertools in layered jars build with Gradle

Closes gh-19867
This commit is contained in:
Andy Wilkinson
2020-01-23 11:43:19 +00:00
parent 288f5ceaee
commit 01a0a54f78
2 changed files with 18 additions and 0 deletions

View File

@@ -123,6 +123,12 @@ class BootJarTests extends AbstractBootArchiveTests<BootJar> {
}
}
@Test
void whenJarIsLayeredThenLayerToolsAreAddedToTheJar() throws IOException {
List<String> entryNames = getEntryNames(createLayeredJar());
assertThat(entryNames).contains("BOOT-INF/layers/dependencies/lib/spring-boot-jarmode-layertools.jar");
}
@Test
void classpathIndexPointsToBootInfLibs() throws IOException {
try (JarFile jarFile = new JarFile(createPopulatedJar())) {