Spring JavaFormat seems to process all source directories, including those that contain AOT-generated sources. This causes failures for checkFormat as well as checkstyle. These are failures that we can ignore since the source code is generated. Additionally, there is some kind of interaction between JavaFormat and the Spring Boot AOT support that makes Gradle think that compileJava and a few other tasks need to depend on formatMain and formatTest.
57 lines
1.5 KiB
Groovy
57 lines
1.5 KiB
Groovy
plugins {
|
|
alias(libs.plugins.org.springframework.boot)
|
|
alias(libs.plugins.io.spring.dependency.management)
|
|
id "nebula.integtest" version "8.2.0"
|
|
id 'java'
|
|
id 'org.hibernate.orm' version '6.5.2.Final'
|
|
id "org.graalvm.buildtools.native" version "0.10.2"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url "https://repo.spring.io/milestone" }
|
|
maven { url "https://repo.spring.io/snapshot" }
|
|
}
|
|
|
|
dependencies {
|
|
implementation platform(libs.org.springframework.spring.framework.bom)
|
|
implementation platform(libs.org.springframework.security.spring.security.bom)
|
|
implementation platform(libs.org.springframework.data.spring.data.bom)
|
|
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
|
implementation 'org.springframework.boot:spring-boot-starter-security'
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.springframework.security:spring-security-data'
|
|
implementation 'com.h2database:h2'
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.security:spring-security-test'
|
|
}
|
|
|
|
group = "org.example"
|
|
|
|
hibernate {
|
|
enhancement {
|
|
enableAssociationManagement = true
|
|
}
|
|
}
|
|
|
|
tasks.withType(Test).configureEach {
|
|
useJUnitPlatform()
|
|
outputs.upToDateWhen { false }
|
|
}
|
|
|
|
if (plugins.hasPlugin("io.spring.javaformat")) {
|
|
compileJava {
|
|
dependsOn("formatMain")
|
|
}
|
|
tasks.checkFormatMain {
|
|
dependsOn("formatMain")
|
|
}
|
|
compileTestJava {
|
|
dependsOn("formatTest")
|
|
}
|
|
tasks.checkFormatTest {
|
|
dependsOn("formatTest")
|
|
}
|
|
}
|