plugins { kotlin("jvm") version "2.0.20" kotlin("plugin.spring") version "2.0.20" kotlin("plugin.serialization") version "2.0.20" id("org.springframework.boot") version "3.3.3" id("io.spring.dependency-management") version "1.1.6" } group = "org.echo" version = "1.0-SNAPSHOT" buildscript { repositories { maven { url = uri("https://maven.aliyun.com/repository/public") } maven { url = uri("https://maven.aliyun.com/repository/google") } maven { url = uri("https://maven.aliyun.com/repository/central") } maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") } } dependencies { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.10") } } repositories { mavenCentral() maven { url = uri("https://repo.spring.io/snapshot") } maven { url = uri("https://maven.aliyun.com/repository/public") } maven { url = uri("https://maven.aliyun.com/repository/spring") } maven { url = uri("https://maven.aliyun.com/repository/central") } maven { url = uri("https://maven.aliyun.com/repository/gradle-plugin") } } dependencies { implementation("org.springframework.boot:spring-boot-starter-data-jdbc") implementation("org.springframework.boot:spring-boot-starter-data-redis") implementation("org.springframework.boot:spring-boot-starter-web") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation("org.apache.httpcomponents:httpclient:4.5.14") implementation("com.google.code.gson:gson:2.10.1") runtimeOnly("com.mysql:mysql-connector-j") testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.test { useJUnitPlatform() // 确保使用 JUnit 平台 }