diff --git a/buildSrc/src/main/java/org/springframework/boot/build/optional/OptionalDependenciesPlugin.java b/buildSrc/src/main/java/org/springframework/boot/build/optional/OptionalDependenciesPlugin.java index 0f622fcee8..87ab9c41d5 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/optional/OptionalDependenciesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/optional/OptionalDependenciesPlugin.java @@ -44,7 +44,7 @@ public class OptionalDependenciesPlugin implements Plugin { @Override public void apply(Project project) { - Configuration optional = project.getConfigurations().create("optional"); + Configuration optional = project.getConfigurations().create(OPTIONAL_CONFIGURATION_NAME); optional.attributes((attributes) -> attributes.attribute(Usage.USAGE_ATTRIBUTE, project.getObjects().named(Usage.class, Usage.JAVA_RUNTIME))); project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> { diff --git a/buildSrc/src/test/java/org/springframework/boot/build/optional/OptionalDependenciesPluginIntegrationTests.java b/buildSrc/src/test/java/org/springframework/boot/build/optional/OptionalDependenciesPluginIntegrationTests.java index d5585ee9e6..c6bb5f64c3 100644 --- a/buildSrc/src/test/java/org/springframework/boot/build/optional/OptionalDependenciesPluginIntegrationTests.java +++ b/buildSrc/src/test/java/org/springframework/boot/build/optional/OptionalDependenciesPluginIntegrationTests.java @@ -57,7 +57,7 @@ public class OptionalDependenciesPluginIntegrationTests { out.println("}"); } BuildResult buildResult = runGradle("printConfigurations"); - assertThat(buildResult.getOutput()).contains("optional"); + assertThat(buildResult.getOutput()).contains(OptionalDependenciesPlugin.OPTIONAL_CONFIGURATION_NAME); } @Test