Files
conti-backend/build.gradle
T
2026-08-17 15:31:27 +08:00

57 lines
2.1 KiB
Groovy
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
plugins {
id 'org.jetbrains.kotlin.jvm' version '2.4.10' apply false
id 'org.jetbrains.kotlin.plugin.spring' version '2.4.10' apply false
id 'org.jetbrains.kotlin.kapt' version '2.4.10' apply false
id 'org.springframework.boot' version '4.1.0' apply false
}
subprojects {
apply plugin: 'java-library'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jetbrains.kotlin.plugin.spring'
group = 'com.continental.retailapp'
version = '0.1.0-SNAPSHOT'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
dependencies {
// 版本对齐一律走 Gradle 原生 platform() BOM,不引 io.spring.dependency-management 插件
implementation platform('org.springframework.boot:spring-boot-dependencies:4.1.0')
implementation platform('org.springframework.cloud:spring-cloud-dependencies:2025.1.2')
testImplementation platform('org.springframework.boot:spring-boot-dependencies:4.1.0')
testImplementation platform('org.springframework.cloud:spring-cloud-dependencies:2025.1.2')
implementation 'org.jetbrains.kotlin:kotlin-reflect'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.mockk:mockk:1.14.2'
// Gradle 9 不再自带 JUnit Platform launcherstarter-test 也不带,必须显式声明,
// 否则 test 任务直接报 "Could not start Gradle Test Executor"。版本由 junit-bom 管。
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
kotlin {
compilerOptions {
freeCompilerArgs.add('-Xjsr305=strict')
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform {
// 本地快速验证:./gradlew build -PexcludeIntegration
// CI 按 09-build-deploy.md 跑完整 ./gradlew testRunner 需能起 Docker,见 10-testing.md
if (project.hasProperty('excludeIntegration')) {
excludeTags 'integration'
}
}
}
}