plugins { id 'java' apply true id 'org.jetbrains.kotlin.jvm' version "${kotlin_version}" apply true id 'org.springframework.boot' version "${spring_boot_version}" apply true id 'io.spring.dependency-management' version "${spring_dependency_management_version}" apply true } group = 'dev.surl' version = '0.0.1-SNAPSHOT' java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } kotlin { jvmToolchain { languageVersion = JavaLanguageVersion.of(21) } } configurations { compileOnly { extendsFrom annotationProcessor } } tasks.register('deployDocker') { dependsOn build doFirst { exec { commandLine 'docker', 'compose', 'down' } } doLast { exec { commandLine 'docker', 'compose', 'up', '-d' } } } // 配置 Gradle 仓库 allprojects { repositories { // 使用阿里云镜像源 maven { url 'https://maven.aliyun.com/repository/central' } maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } maven { url 'https://maven.aliyun.com/repository/public' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url "https://maven.noelware.org" } } } dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-aop' implementation "org.jetbrains.exposed:exposed-spring-boot-starter:${exposed_version}" implementation 'commons-codec:commons-codec' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation "org.noelware.charted.snowflake:snowflake:${snowflake_version}" implementation 'org.springframework.boot:spring-boot-starter-security' implementation "io.jsonwebtoken:jjwt-api:${jwt_version}" implementation 'org.springframework.boot:spring-boot-starter-data-redis' testImplementation 'org.springframework.security:spring-security-test' testImplementation 'org.springframework.boot:spring-boot-starter-test' runtimeOnly 'org.postgresql:postgresql' runtimeOnly "io.jsonwebtoken:jjwt-impl:${jwt_version}" runtimeOnly "io.jsonwebtoken:jjwt-jackson:${jwt_version}" testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } test { useJUnitPlatform() enabled = false }