diff --git a/settings.gradle b/settings.gradle index 99be5be833..1b59ce62bb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -83,6 +83,7 @@ include "spring-boot-project:spring-boot-quartz" include "spring-boot-project:spring-boot-r2dbc" include "spring-boot-project:spring-boot-reactor-netty" include "spring-boot-project:spring-boot-rsocket" +include "spring-boot-project:spring-boot-sendgrid" include "spring-boot-project:spring-boot-test" include "spring-boot-project:spring-boot-test-autoconfigure" include "spring-boot-project:spring-boot-test-integration-tests" diff --git a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle index b63cf3a42a..bacb082e2f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure-all/build.gradle @@ -103,7 +103,6 @@ dependencies { optional("org.apiguardian:apiguardian-api") optional("org.eclipse.angus:angus-mail") optional("com.github.ben-manes.caffeine:caffeine") - optional("com.sendgrid:sendgrid-java") optional("com.zaxxer:HikariCP") optional("org.aspectj:aspectjweaver") optional("org.cache2k:cache2k-spring") diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 231a5e9f4d..14b591ce7d 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/spring-boot-project/spring-boot-autoconfigure-all/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -68,7 +68,6 @@ org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2Re org.springframework.boot.autoconfigure.security.oauth2.resource.reactive.ReactiveOAuth2ResourceServerAutoConfiguration org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerAutoConfiguration org.springframework.boot.autoconfigure.security.oauth2.server.servlet.OAuth2AuthorizationServerJwtAutoConfiguration -org.springframework.boot.autoconfigure.sendgrid.SendGridAutoConfiguration org.springframework.boot.autoconfigure.session.SessionAutoConfiguration org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 97a8033162..a88d5ef8b1 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -2020,6 +2020,7 @@ bom { "spring-boot-r2dbc", "spring-boot-reactor-netty", "spring-boot-rsocket", + "spring-boot-sendgrid", "spring-boot-starter", "spring-boot-starter-activemq", "spring-boot-starter-actuator", diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 2f79e3f7e6..29b6cd4102 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -94,6 +94,7 @@ dependencies { autoConfiguration(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-rsocket", configuration: "autoConfigurationMetadata")) + autoConfiguration(project(path: ":spring-boot-project:spring-boot-sendgrid", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "autoConfigurationMetadata")) autoConfiguration(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "autoConfigurationMetadata")) @@ -138,6 +139,7 @@ dependencies { configurationProperties(project(path: ":spring-boot-project:spring-boot-r2dbc", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-reactor-netty", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-rsocket", configuration: "configurationPropertiesMetadata")) + configurationProperties(project(path: ":spring-boot-project:spring-boot-sendgrid", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-test-autoconfigure", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "configurationPropertiesMetadata")) configurationProperties(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "configurationPropertiesMetadata")) diff --git a/spring-boot-project/spring-boot-sendgrid/build.gradle b/spring-boot-project/spring-boot-sendgrid/build.gradle new file mode 100644 index 0000000000..ddc87a79f8 --- /dev/null +++ b/spring-boot-project/spring-boot-sendgrid/build.gradle @@ -0,0 +1,20 @@ +plugins { + id "java-library" + id "org.springframework.boot.auto-configuration" + id "org.springframework.boot.configuration-properties" + id "org.springframework.boot.deployed" + id "org.springframework.boot.optional-dependencies" +} + +description = "Spring Boot SendGrid" + +dependencies { + api(project(":spring-boot-project:spring-boot")) + api("com.sendgrid:sendgrid-java") + + optional(project(":spring-boot-project:spring-boot-autoconfigure")) + + testImplementation(project(":spring-boot-project:spring-boot-test")) + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) + testRuntimeOnly("ch.qos.logback:logback-classic") +} diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfiguration.java b/spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/SendGridAutoConfiguration.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfiguration.java rename to spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/SendGridAutoConfiguration.java index a32f16ee1b..d2f0c799d0 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfiguration.java +++ b/spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/SendGridAutoConfiguration.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.sendgrid; +package org.springframework.boot.sendgrid.autoconfigure; import com.sendgrid.Client; import com.sendgrid.SendGrid; @@ -36,7 +36,7 @@ import org.springframework.context.annotation.Bean; * @author Maciej Walkowiak * @author Patrick Bray * @author Andy Wilkinson - * @since 1.3.0 + * @since 4.0.0 */ @AutoConfiguration @ConditionalOnClass(SendGrid.class) diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridProperties.java b/spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/SendGridProperties.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridProperties.java rename to spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/SendGridProperties.java index 3c68d7bca9..80fd720a5f 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/SendGridProperties.java +++ b/spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/SendGridProperties.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.sendgrid; +package org.springframework.boot.sendgrid.autoconfigure; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -23,7 +23,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; * * @author Maciej Walkowiak * @author Andy Wilkinson - * @since 1.3.0 + * @since 4.0.0 */ @ConfigurationProperties("spring.sendgrid") public class SendGridProperties { diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/package-info.java b/spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/package-info.java similarity index 84% rename from spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/package-info.java rename to spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/package-info.java index d9fe7b0913..edd10b910d 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/main/java/org/springframework/boot/autoconfigure/sendgrid/package-info.java +++ b/spring-boot-project/spring-boot-sendgrid/src/main/java/org/springframework/boot/sendgrid/autoconfigure/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2025 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. @@ -17,4 +17,4 @@ /** * Auto-configuration for SendGrid. */ -package org.springframework.boot.autoconfigure.sendgrid; +package org.springframework.boot.sendgrid.autoconfigure; diff --git a/spring-boot-project/spring-boot-sendgrid/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-project/spring-boot-sendgrid/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000000..b9f4adc626 --- /dev/null +++ b/spring-boot-project/spring-boot-sendgrid/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +org.springframework.boot.sendgrid.autoconfigure.SendGridAutoConfiguration diff --git a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java b/spring-boot-project/spring-boot-sendgrid/src/test/java/org/springframework/boot/sendgrid/autoconfigure/SendGridAutoConfigurationTests.java similarity index 96% rename from spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java rename to spring-boot-project/spring-boot-sendgrid/src/test/java/org/springframework/boot/sendgrid/autoconfigure/SendGridAutoConfigurationTests.java index 388f6c8398..7f0256fa3b 100644 --- a/spring-boot-project/spring-boot-autoconfigure-all/src/test/java/org/springframework/boot/autoconfigure/sendgrid/SendGridAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-sendgrid/src/test/java/org/springframework/boot/sendgrid/autoconfigure/SendGridAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.autoconfigure.sendgrid; +package org.springframework.boot.sendgrid.autoconfigure; import com.sendgrid.SendGrid; import org.apache.http.impl.conn.DefaultProxyRoutePlanner;