plugins { id 'java' id 'jacoco' id 'org.springframework.boot' version '4.1.1' id 'io.spring.dependency-management' version '1.1.7' } group = 'com.study' version = '0.0.1-SNAPSHOT' java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.1.1' implementation 'org.springframework.boot:spring-boot-starter-flyway' runtimeOnly 'org.flywaydb:flyway-database-postgresql' runtimeOnly 'org.postgresql:postgresql' runtimeOnly 'com.h2database:h2' runtimeOnly 'org.springframework.boot:spring-boot-h2console' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.boot:spring-boot-webmvc-test' testImplementation 'org.springframework.boot:spring-boot-testcontainers' testImplementation 'org.testcontainers:testcontainers-junit-jupiter:2.0.5' testImplementation 'org.testcontainers:testcontainers-postgresql:2.0.5' testImplementation 'com.tngtech.archunit:archunit-junit5:1.4.1' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { useJUnitPlatform() finalizedBy tasks.named('jacocoTestReport') } jacocoTestReport { dependsOn test reports { xml.required = true; html.required = true } } jacocoTestCoverageVerification { dependsOn test violationRules { rule { limit { counter = 'LINE' value = 'COVEREDRATIO' minimum = 0.90 } limit { counter = 'BRANCH' value = 'COVEREDRATIO' minimum = 0.75 } } } } tasks.named('check') { dependsOn tasks.named('jacocoTestCoverageVerification') }