Generate the AutoConfiguration.imports file from annotations
This commit adds the `AutoConfigurationImportsAnnotationProcessor` to the `spring-boot-autoconfigure-processor` annotation processor module. When added to a project build, the annotation processor will generate the `org.springframework.boot.autoconfigure.AutoConfiguration.imports` file automatically from `@AutoConfiguration`-annotated classes. It also applies the annotation processor to the Spring Boot build. Closes gh-31228
This commit is contained in:
@@ -21,6 +21,7 @@ dependencies {
|
||||
|
||||
testRepository(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "mavenRepository"))
|
||||
testRepository(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin", configuration: "mavenRepository"))
|
||||
testRepository(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-autoconfigure-processor", configuration: "mavenRepository"))
|
||||
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter", configuration: "mavenRepository"))
|
||||
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-jetty", configuration: "mavenRepository"))
|
||||
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-json", configuration: "mavenRepository"))
|
||||
|
||||
@@ -49,6 +49,8 @@ tasks.register("resourcesJar", Jar) { jar ->
|
||||
}
|
||||
|
||||
dependencies {
|
||||
annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor")
|
||||
|
||||
compileOnly("org.eclipse.jetty:jetty-server")
|
||||
|
||||
implementation("org.springframework.boot:spring-boot-starter")
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
com.autoconfig.ExampleAutoConfiguration
|
||||
Reference in New Issue
Block a user