spring-boot/spring-boot-project/spring-boot/build.gradle

96 lines
3.7 KiB
Groovy

plugins {
id "dev.adamko.dokkatoo-html"
id "java-library"
id "java-test-fixtures"
id "org.jetbrains.kotlin.jvm"
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.fasterxml.jackson.core:jackson-databind")
optional("com.google.code.gson:gson")
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-webflux")
optional("org.springframework:spring-webmvc")
optional("org.yaml:snakeyaml")
testFixturesCompileOnly(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testFixturesCompileOnly("io.projectreactor:reactor-test")
testFixturesCompileOnly("io.projectreactor.netty:reactor-netty-http")
testFixturesCompileOnly("org.apache.httpcomponents.client5:httpclient5")
testFixturesCompileOnly("org.apache.tomcat.embed:tomcat-embed-jasper")
testFixturesCompileOnly("org.eclipse.jetty.http2:jetty-http2-client")
testFixturesCompileOnly("org.eclipse.jetty.http2:jetty-http2-client-transport")
testFixturesCompileOnly("jakarta.servlet:jakarta.servlet-api")
testFixturesCompileOnly("org.mockito:mockito-core")
testFixturesCompileOnly("org.springframework:spring-web")
testImplementation(project(":spring-boot-project:spring-boot-tools: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") {
def generatedSources = fileTree("build/generated-sources/main")
// Exclude source generated from the templates as expand(properties) changes line endings on Windows
exclude { candidate -> generatedSources.contains(candidate.file) }
// Add the templates to check that the input is correctly formatted
source(fileTree("src/main/javaTemplates"))
}
plugins.withType(EclipsePlugin) {
eclipse {
synchronizationTasks syncJavaTemplates
}
}
sourceSets {
main {
java {
srcDirs syncJavaTemplates
}
}
}