|
| 1 | +plugins { |
| 2 | + id "dev.adamko.dokkatoo-html" |
| 3 | + id "java-library" |
| 4 | + id "org.jetbrains.kotlin.jvm" |
| 5 | + id "org.springframework.boot.deployed" |
| 6 | + id "org.springframework.boot.optional-dependencies" |
| 7 | +} |
| 8 | + |
| 9 | +description = "Spring Boot All" |
| 10 | + |
| 11 | +def tomcatConfigProperties = layout.buildDirectory.dir("tomcat-config-properties") |
| 12 | + |
| 13 | +configurations { |
| 14 | + tomcatDistribution |
| 15 | +} |
| 16 | + |
| 17 | +dependencies { |
| 18 | + api(project(":spring-boot-project:spring-boot")) |
| 19 | + api("org.springframework:spring-core") |
| 20 | + api("org.springframework:spring-context") |
| 21 | + |
| 22 | + optional("ch.qos.logback:logback-classic") |
| 23 | + optional("com.clickhouse:clickhouse-jdbc") |
| 24 | + optional("com.fasterxml.jackson.core:jackson-databind") |
| 25 | + optional("com.h2database:h2") |
| 26 | + optional("com.google.code.gson:gson") |
| 27 | + optional("com.mchange:c3p0") |
| 28 | + optional("com.oracle.database.jdbc:ucp11") |
| 29 | + optional("com.oracle.database.jdbc:ojdbc11") |
| 30 | + optional("com.samskivert:jmustache") |
| 31 | + optional("com.zaxxer:HikariCP") |
| 32 | + optional("io.netty:netty-tcnative-boringssl-static") |
| 33 | + optional("io.projectreactor:reactor-tools") |
| 34 | + optional("io.projectreactor.netty:reactor-netty-http") |
| 35 | + optional("io.r2dbc:r2dbc-pool") |
| 36 | + optional("io.rsocket:rsocket-core") |
| 37 | + optional("io.rsocket:rsocket-transport-netty") |
| 38 | + optional("io.undertow:undertow-servlet") |
| 39 | + optional("jakarta.jms:jakarta.jms-api") |
| 40 | + optional("jakarta.persistence:jakarta.persistence-api") |
| 41 | + optional("jakarta.servlet:jakarta.servlet-api") |
| 42 | + optional("jakarta.transaction:jakarta.transaction-api") |
| 43 | + optional("junit:junit") |
| 44 | + optional("org.apache.commons:commons-dbcp2") { |
| 45 | + exclude(group: "commons-logging", module: "commons-logging") |
| 46 | + } |
| 47 | + optional("org.apache.httpcomponents.client5:httpclient5") |
| 48 | + optional("org.apache.logging.log4j:log4j-api") |
| 49 | + optional("org.apache.logging.log4j:log4j-core") |
| 50 | + optional("org.apache.logging.log4j:log4j-jul") |
| 51 | + optional("org.apache.tomcat.embed:tomcat-embed-core") |
| 52 | + optional("org.apache.tomcat.embed:tomcat-embed-jasper") |
| 53 | + optional("org.apache.tomcat:tomcat-jdbc") |
| 54 | + optional("org.assertj:assertj-core") |
| 55 | + optional("org.apache.groovy:groovy") |
| 56 | + optional("org.apache.groovy:groovy-xml") |
| 57 | + optional("org.crac:crac") |
| 58 | + optional("org.eclipse.jetty:jetty-alpn-conscrypt-server") |
| 59 | + optional("org.eclipse.jetty:jetty-client") |
| 60 | + optional("org.eclipse.jetty:jetty-util") |
| 61 | + optional("org.eclipse.jetty.ee10:jetty-ee10-servlets") |
| 62 | + optional("org.eclipse.jetty.ee10:jetty-ee10-webapp") |
| 63 | + optional("org.eclipse.jetty.http2:jetty-http2-server") |
| 64 | + optional("org.flywaydb:flyway-core") |
| 65 | + optional("org.hamcrest:hamcrest-library") |
| 66 | + optional("org.hibernate.orm:hibernate-core") |
| 67 | + optional("org.hibernate.validator:hibernate-validator") |
| 68 | + optional("org.jooq:jooq") { |
| 69 | + exclude(group: "javax.xml.bind", module: "jaxb-api") |
| 70 | + } |
| 71 | + optional("org.liquibase:liquibase-core") { |
| 72 | + exclude(group: "javax.xml.bind", module: "jaxb-api") |
| 73 | + } |
| 74 | + optional("org.messaginghub:pooled-jms") { |
| 75 | + exclude group: "org.apache.geronimo.specs", module: "geronimo-jms_2.0_spec" |
| 76 | + } |
| 77 | + optional("org.postgresql:postgresql") |
| 78 | + optional("org.slf4j:jul-to-slf4j") |
| 79 | + optional("org.slf4j:slf4j-api") |
| 80 | + optional("org.springframework:spring-messaging") |
| 81 | + optional("org.springframework:spring-orm") |
| 82 | + optional("org.springframework:spring-jms") |
| 83 | + optional("org.springframework:spring-oxm") |
| 84 | + optional("org.springframework:spring-r2dbc") |
| 85 | + optional("org.springframework:spring-test") |
| 86 | + optional("org.springframework:spring-web") |
| 87 | + optional("org.springframework:spring-webflux") |
| 88 | + optional("org.springframework:spring-webmvc") |
| 89 | + optional("org.springframework.security:spring-security-web") |
| 90 | + optional("org.springframework.ws:spring-ws-core") { |
| 91 | + exclude group: "com.sun.mail", module: "jakarta.mail" |
| 92 | + exclude group: "jakarta.platform", module: "jakarta.jakartaee-api" |
| 93 | + exclude group: "org.eclipse.jetty", module: "jetty-server" |
| 94 | + exclude group: "org.eclipse.jetty", module: "jetty-servlet" |
| 95 | + exclude group: "jakarta.mail", module: "jakarta.mail-api" |
| 96 | + } |
| 97 | + optional("org.vibur:vibur-dbcp") |
| 98 | + optional("org.yaml:snakeyaml") |
| 99 | + optional("org.jetbrains.kotlin:kotlin-reflect") |
| 100 | + optional("org.jetbrains.kotlin:kotlin-stdlib") |
| 101 | + optional("software.amazon.jdbc:aws-advanced-jdbc-wrapper") { |
| 102 | + exclude(group: "commons-logging", module: "commons-logging") |
| 103 | + } |
| 104 | + |
| 105 | + testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) |
| 106 | + testImplementation(testFixtures(project(":spring-boot-project:spring-boot"))) |
| 107 | + testImplementation("org.springframework:spring-core-test") |
| 108 | + testImplementation("com.ibm.db2:jcc") |
| 109 | + testImplementation("com.jayway.jsonpath:json-path") |
| 110 | + testImplementation("com.microsoft.sqlserver:mssql-jdbc") |
| 111 | + testImplementation("com.mysql:mysql-connector-j") |
| 112 | + testImplementation("com.sun.xml.messaging.saaj:saaj-impl") |
| 113 | + testImplementation("io.projectreactor:reactor-test") |
| 114 | + testImplementation("io.r2dbc:r2dbc-h2") |
| 115 | + testImplementation("jakarta.inject:jakarta.inject-api") |
| 116 | + testImplementation("jakarta.xml.ws:jakarta.xml.ws-api") |
| 117 | + testImplementation("net.sourceforge.jtds:jtds") |
| 118 | + testImplementation("org.apache.derby:derby") |
| 119 | + testImplementation("org.apache.derby:derbytools") |
| 120 | + testImplementation("org.awaitility:awaitility") |
| 121 | + testImplementation("org.codehaus.janino:janino") |
| 122 | + testImplementation("org.eclipse.jetty:jetty-client") |
| 123 | + testImplementation("org.eclipse.jetty.http2:jetty-http2-client") |
| 124 | + testImplementation("org.eclipse.jetty.http2:jetty-http2-client-transport") |
| 125 | + testImplementation("org.firebirdsql.jdbc:jaybird") { |
| 126 | + exclude group: "javax.resource", module: "connector-api" |
| 127 | + } |
| 128 | + testImplementation("org.hsqldb:hsqldb") |
| 129 | + testImplementation("org.junit.jupiter:junit-jupiter") |
| 130 | + testImplementation("org.mariadb.jdbc:mariadb-java-client") { |
| 131 | + exclude group: "org.slf4j", module: "jcl-over-slf4j" |
| 132 | + } |
| 133 | + testImplementation("org.mockito:mockito-core") |
| 134 | + testImplementation("org.mockito:mockito-junit-jupiter") |
| 135 | + testImplementation("org.springframework:spring-context-support") |
| 136 | + testImplementation("org.springframework:spring-core-test") |
| 137 | + testImplementation("org.springframework.data:spring-data-redis") |
| 138 | + testImplementation("org.springframework.data:spring-data-r2dbc") |
| 139 | + testImplementation("org.xerial:sqlite-jdbc") |
| 140 | + |
| 141 | + testRuntimeOnly("org.testcontainers:jdbc") { |
| 142 | + exclude group: "javax.annotation", module: "javax.annotation-api" |
| 143 | + exclude group: "javax.xml.bind", module: "jaxb-api" |
| 144 | + } |
| 145 | + |
| 146 | + tomcatDistribution("org.apache.tomcat:tomcat:${tomcatVersion}@zip") |
| 147 | +} |
| 148 | + |
| 149 | +task extractTomcatConfigProperties(type: Sync) { |
| 150 | + destinationDir = file(tomcatConfigProperties) |
| 151 | + from { |
| 152 | + zipTree(configurations.tomcatDistribution.incoming.files.singleFile).matching { |
| 153 | + include '**/conf/catalina.properties' |
| 154 | + }.singleFile |
| 155 | + } |
| 156 | +} |
| 157 | + |
| 158 | +def syncJavaTemplates = tasks.register("syncJavaTemplates", Sync) { |
| 159 | + from("src/main/javaTemplates") |
| 160 | + into("build/generated-sources/main") |
| 161 | + def properties = ["springBootVersion": project.version] |
| 162 | + expand(properties) |
| 163 | + inputs.properties(properties) |
| 164 | +} |
| 165 | + |
| 166 | +tasks.named("checkFormatMain") { |
| 167 | + def generatedSources = fileTree("build/generated-sources/main") |
| 168 | + // Exclude source generated from the templates as expand(properties) changes line endings on Windows |
| 169 | + exclude { candidate -> generatedSources.contains(candidate.file) } |
| 170 | + // Add the templates to check that the input is correctly formatted |
| 171 | + source(fileTree("src/main/javaTemplates")) |
| 172 | +} |
| 173 | + |
| 174 | +plugins.withType(EclipsePlugin) { |
| 175 | + eclipse { |
| 176 | + synchronizationTasks syncJavaTemplates |
| 177 | + } |
| 178 | +} |
| 179 | + |
| 180 | +sourceSets { |
| 181 | + main { |
| 182 | + java { |
| 183 | + srcDirs syncJavaTemplates |
| 184 | + } |
| 185 | + } |
| 186 | + test { |
| 187 | + output.dir(tomcatConfigProperties, builtBy: "extractTomcatConfigProperties") |
| 188 | + } |
| 189 | +} |
| 190 | + |
| 191 | +test { |
| 192 | + jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED" |
| 193 | +} |
0 commit comments