Files
spring-boot/core/spring-boot/build.gradle
T
2026-05-14 15:03:44 +01:00

112 lines
3.8 KiB
Groovy

/*
* Copyright 2012-present 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id "org.jetbrains.kotlin.jvm"
id "org.jetbrains.dokka"
id "java-library"
id "java-test-fixtures"
id "org.springframework.boot.configuration-properties"
id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot"
dependencies {
annotationProcessor("org.apache.logging.log4j:log4j-core")
api("org.springframework:spring-core")
api("org.springframework:spring-context")
optional("ch.qos.logback:logback-classic")
optional("com.google.code.gson:gson")
optional("io.projectreactor:reactor-core")
optional("jakarta.servlet:jakarta.servlet-api")
optional("jakarta.validation:jakarta.validation-api")
optional("org.apache.groovy:groovy")
optional("org.apache.logging.log4j:log4j-api")
optional("org.apache.logging.log4j:log4j-core")
optional("org.apache.logging.log4j:log4j-jul")
optional("org.crac:crac")
optional("org.jetbrains.kotlin:kotlin-reflect")
optional("org.jetbrains.kotlin:kotlin-stdlib")
optional("org.slf4j:jul-to-slf4j")
optional("org.springframework:spring-test")
optional("org.springframework:spring-web")
optional("org.yaml:snakeyaml")
optional("tools.jackson.core:jackson-databind")
testCompileOnly("com.google.code.findbugs:jsr305")
testFixturesCompileOnly(project(":test-support:spring-boot-test-support"))
testImplementation(project(":test-support:spring-boot-test-support"))
testImplementation("io.projectreactor:reactor-test")
testImplementation("io.projectreactor.netty:reactor-netty-http")
testImplementation("jakarta.annotation:jakarta.annotation-api")
testImplementation("jakarta.inject:jakarta.inject-api")
testImplementation("org.apache.groovy:groovy-xml")
testImplementation("org.apache.httpcomponents.client5:httpclient5")
testImplementation("org.apache.tomcat:tomcat-jdbc")
testImplementation("org.apache.tomcat.embed:tomcat-embed-core")
testImplementation("org.apache.tomcat.embed:tomcat-embed-jasper")
testImplementation("org.codehaus.janino:janino")
testImplementation("org.eclipse.jetty:jetty-client")
testImplementation("org.eclipse.jetty.http2:jetty-http2-client")
testImplementation("org.eclipse.jetty.http2:jetty-http2-client-transport")
testImplementation("org.hibernate.validator:hibernate-validator")
testImplementation("org.jboss.logging:jboss-logging")
testImplementation("org.springframework.data:spring-data-r2dbc")
}
def syncJavaTemplates = tasks.register("syncJavaTemplates", Sync) {
from("src/main/javaTemplates")
into("build/generated-sources/main")
def properties = ["springBootVersion": project.version]
expand(properties)
inputs.properties(properties)
}
tasks.named("checkFormatMain") {
// Add the templates to check that the input is correctly formatted
source(fileTree("src/main/javaTemplates"))
}
tasks.named("compileJava") {
// Provide the project coordinates to the `GraalVmProcessor`:
options.compilerArgs << '-Alog4j.graalvm.groupId=org.springframework.boot'
options.compilerArgs << '-Alog4j.graalvm.artifactId=spring-boot-log4j'
}
plugins.withType(EclipsePlugin) {
eclipse {
synchronizationTasks syncJavaTemplates
}
}
sourceSets {
main {
java {
srcDirs syncJavaTemplates
}
}
}
tasks.named("compileTestJava") {
options.nullability.checking = "tests"
}