2021-05-10 18:01:34 +01:00
|
|
|
plugins {
|
|
|
|
|
id 'java'
|
2025-07-04 17:28:34 +02:00
|
|
|
id 'checkstyle'
|
2025-10-14 12:14:25 +02:00
|
|
|
id 'org.springframework.boot' version '4.0.0-M3'
|
2025-06-04 21:46:29 +02:00
|
|
|
id 'io.spring.dependency-management' version '1.1.7'
|
2025-10-04 10:32:59 +02:00
|
|
|
id 'org.graalvm.buildtools.native' version '0.11.1'
|
|
|
|
|
id 'org.cyclonedx.bom' version '3.0.0'
|
|
|
|
|
id 'io.spring.javaformat' version '0.0.47'
|
2024-01-31 12:45:31 +00:00
|
|
|
id "io.spring.nohttp" version "0.0.11"
|
2025-09-02 13:12:56 +02:00
|
|
|
id 'net.ltgt.errorprone' version '4.3.0'
|
2021-05-10 18:01:34 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-30 07:57:47 +00:00
|
|
|
gradle.startParameter.excludedTaskNames += [ "checkFormatAot", "checkFormatAotTest" ]
|
2021-05-10 18:01:34 +01:00
|
|
|
|
|
|
|
|
group = 'org.springframework.samples'
|
2025-09-01 17:42:56 +02:00
|
|
|
version = '4.0.0-SNAPSHOT'
|
2024-02-29 13:09:17 +03:00
|
|
|
|
|
|
|
|
java {
|
2025-07-04 17:28:34 +02:00
|
|
|
toolchain {
|
2025-10-14 12:35:15 +02:00
|
|
|
languageVersion = JavaLanguageVersion.of(25)
|
2025-07-04 17:28:34 +02:00
|
|
|
}
|
2024-02-29 13:09:17 +03:00
|
|
|
}
|
2021-05-10 18:01:34 +01:00
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-04 10:32:59 +02:00
|
|
|
ext.checkstyleVersion = "11.1.0"
|
|
|
|
|
ext.springJavaformatCheckstyleVersion = "0.0.47"
|
|
|
|
|
ext.webjarsLocatorLiteVersion = "1.1.1"
|
2021-12-16 11:33:27 +00:00
|
|
|
ext.webjarsFontawesomeVersion = "4.7.0"
|
2025-10-04 10:32:59 +02:00
|
|
|
ext.webjarsBootstrapVersion = "5.3.8"
|
2025-10-14 12:14:25 +02:00
|
|
|
ext.errorProneVersion = "2.42.0"
|
|
|
|
|
ext.nullAwayVersion = "0.12.10"
|
2021-05-10 18:01:34 +01:00
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-cache'
|
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
|
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
|
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
|
|
|
implementation 'javax.cache:cache-api'
|
2022-12-20 11:09:10 +00:00
|
|
|
implementation 'jakarta.xml.bind:jakarta.xml.bind-api'
|
2022-01-07 09:20:08 +00:00
|
|
|
runtimeOnly 'org.springframework.boot:spring-boot-starter-actuator'
|
2024-11-27 10:47:52 +01:00
|
|
|
runtimeOnly "org.webjars:webjars-locator-lite:${webjarsLocatorLiteVersion}"
|
2021-12-16 11:33:27 +00:00
|
|
|
runtimeOnly "org.webjars.npm:bootstrap:${webjarsBootstrapVersion}"
|
|
|
|
|
runtimeOnly "org.webjars.npm:font-awesome:${webjarsFontawesomeVersion}"
|
2022-12-20 11:09:10 +00:00
|
|
|
runtimeOnly 'com.github.ben-manes.caffeine:caffeine'
|
2021-05-10 18:01:34 +01:00
|
|
|
runtimeOnly 'com.h2database:h2'
|
2022-12-20 11:09:10 +00:00
|
|
|
runtimeOnly 'com.mysql:mysql-connector-j'
|
2021-12-16 11:33:27 +00:00
|
|
|
runtimeOnly 'org.postgresql:postgresql'
|
2021-05-10 18:01:34 +01:00
|
|
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
2025-09-01 17:42:56 +02:00
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-restclient'
|
2023-07-06 06:44:53 +01:00
|
|
|
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
|
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-docker-compose'
|
|
|
|
|
testImplementation 'org.testcontainers:junit-jupiter'
|
|
|
|
|
testImplementation 'org.testcontainers:mysql'
|
2024-09-28 08:58:17 +02:00
|
|
|
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${springJavaformatCheckstyleVersion}"
|
|
|
|
|
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
|
2025-09-02 13:12:56 +02:00
|
|
|
errorprone "com.google.errorprone:error_prone_core:${errorProneVersion}"
|
|
|
|
|
errorprone "com.uber.nullaway:nullaway:${nullAwayVersion}"
|
2021-05-10 18:01:34 +01:00
|
|
|
}
|
|
|
|
|
|
2022-09-01 23:29:06 +03:00
|
|
|
tasks.named('test') {
|
2021-05-10 18:01:34 +01:00
|
|
|
useJUnitPlatform()
|
|
|
|
|
}
|
2024-01-31 12:45:31 +00:00
|
|
|
|
|
|
|
|
checkstyle {
|
2024-02-14 01:56:03 +00:00
|
|
|
configDirectory = project.file('src/checkstyle')
|
|
|
|
|
configFile = file('src/checkstyle/nohttp-checkstyle.xml')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkstyleNohttp {
|
|
|
|
|
configDirectory = project.file('src/checkstyle')
|
|
|
|
|
configFile = file('src/checkstyle/nohttp-checkstyle.xml')
|
2024-01-31 12:45:31 +00:00
|
|
|
}
|
|
|
|
|
|
2025-09-02 13:12:56 +02:00
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
|
|
|
options.release = 17
|
|
|
|
|
options.errorprone {
|
|
|
|
|
disableAllChecks = true
|
|
|
|
|
}
|
|
|
|
|
if (name.equals("compileJava")) {
|
|
|
|
|
options.errorprone {
|
|
|
|
|
error("NullAway")
|
|
|
|
|
option("NullAway:OnlyNullMarked", "true")
|
|
|
|
|
option("NullAway:CustomContractAnnotations", "org.springframework.lang.Contract")
|
|
|
|
|
option("NullAway:JSpecifyMode", "true")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-31 12:45:31 +00:00
|
|
|
tasks.named("formatMain").configure { dependsOn("checkstyleMain") }
|
|
|
|
|
tasks.named("formatMain").configure { dependsOn("checkstyleNohttp") }
|
|
|
|
|
|
|
|
|
|
tasks.named("formatTest").configure { dependsOn("checkstyleTest") }
|
|
|
|
|
tasks.named("formatTest").configure { dependsOn("checkstyleNohttp") }
|
|
|
|
|
|
|
|
|
|
checkstyleAot.enabled = false
|
|
|
|
|
checkstyleAotTest.enabled = false
|
|
|
|
|
|
|
|
|
|
checkFormatAot.enabled = false
|
|
|
|
|
checkFormatAotTest.enabled = false
|
|
|
|
|
|
|
|
|
|
formatAot.enabled = false
|
|
|
|
|
formatAotTest.enabled = false
|
2025-07-04 17:28:34 +02:00
|
|
|
|
|
|
|
|
wrapper {
|
|
|
|
|
gradleVersion = "8.14.3"
|
|
|
|
|
distributionType = Wrapper.DistributionType.ALL
|
|
|
|
|
}
|