Add spring-configuration-metadata

- Adding boot's annotation processor to spring-shell-autoconfigure
  and spring-shell-test-autoconfigure
- Backport #948
- Fixes #950
This commit is contained in:
Janne Valkealahti
2023-12-15 09:49:26 +00:00
parent 68eb1a61fc
commit 98b8eb356d
3 changed files with 4 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2022 the original author or authors.
* Copyright 2022-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -47,6 +47,7 @@ public class ManagementConfigurationPlugin implements Plugin<Project> {
PluginContainer plugins = project.getPlugins();
plugins.withType(JavaPlugin.class, (javaPlugin) -> {
configurations.getByName(JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME).extendsFrom(management);
configurations.getByName(JavaPlugin.ANNOTATION_PROCESSOR_CONFIGURATION_NAME).extendsFrom(management);
});
plugins.withType(JavaTestFixturesPlugin.class, (javaTestFixturesPlugin) -> {
configurations.getByName("testFixturesCompileClasspath").extendsFrom(management);

View File

@@ -11,4 +11,5 @@ dependencies {
implementation project(':spring-shell-standard')
implementation project(':spring-shell-standard-commands')
testImplementation 'org.springframework.boot:spring-boot-starter-test'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
}

View File

@@ -18,4 +18,5 @@ dependencies {
optional 'org.assertj:assertj-core'
optional 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'org.awaitility:awaitility'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
}