Polish Gradle layer configuration DSL
This commit modifies the DSL for custom layer configuration in the Gradle plugin to avoid duplication of terms that could be confusing. Fixes gh-20563
This commit is contained in:
@@ -122,7 +122,7 @@ class BootJarTests extends AbstractBootArchiveTests<BootJar> {
|
||||
@Test
|
||||
void whenJarIsLayeredWithCustomStrategiesThenContentsAreMovedToLayerDirectories() throws IOException {
|
||||
File jar = createLayeredJar((configuration) -> {
|
||||
configuration.layers("my-deps", "my-internal-deps", "my-snapshot-deps", "resources", "application");
|
||||
configuration.layersOrder("my-deps", "my-internal-deps", "my-snapshot-deps", "resources", "application");
|
||||
configuration.libraries(createLibraryStrategy("my-snapshot-deps", "com.example:*:*.SNAPSHOT"),
|
||||
createLibraryStrategy("my-internal-deps", "com.example:*:*"),
|
||||
createLibraryStrategy("my-deps", "*:*"));
|
||||
|
||||
@@ -6,7 +6,7 @@ plugins {
|
||||
bootJar {
|
||||
mainClassName = 'com.example.Application'
|
||||
layers {
|
||||
layers "dependencies", "commons-dependencies", "snapshot-dependencies", "static", "app"
|
||||
layersOrder "dependencies", "commons-dependencies", "snapshot-dependencies", "static", "app"
|
||||
libraries {
|
||||
layerContent("snapshot-dependencies") { coordinates { include "*:*:*SNAPSHOT" } }
|
||||
layerContent("commons-dependencies") { coordinates { include "org.apache.commons:*" } }
|
||||
|
||||
Reference in New Issue
Block a user