- 使用 git mv 将包路径由 com.example.finance 迁移至 cn.rosercode.finance - 主类 MyApplication 重命名为 FinanceApplication,测试类同步更名 - build.gradle 的 group 调整为 cn.rosercode - 同步 application.yml、logback-spring.xml 中的包引用 - 测试账号密码移至 credentials.md 并加入忽略规则,README 移除该信息 - 更新 README 与 docs 中的包路径示例
78 lines
2.2 KiB
Groovy
78 lines
2.2 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '3.3.6'
|
|
id 'io.spring.dependency-management' version '1.1.7'
|
|
}
|
|
|
|
group = 'cn.rosercode'
|
|
version = '0.0.1-SNAPSHOT'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(21)
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
compileOnly {
|
|
extendsFrom annotationProcessor
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
|
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
|
implementation 'org.springframework.security:spring-security-crypto'
|
|
|
|
implementation 'com.baomidou:mybatis-plus-spring-boot3-starter:3.5.12'
|
|
implementation 'com.baomidou:mybatis-plus-jsqlparser:3.5.12'
|
|
runtimeOnly 'com.mysql:mysql-connector-j'
|
|
|
|
implementation 'com.github.xiaoymin:knife4j-openapi3-jakarta-spring-boot-starter:4.5.0'
|
|
|
|
implementation 'com.alibaba:easyexcel:4.0.3'
|
|
implementation 'org.apache.commons:commons-csv:1.12.0'
|
|
|
|
implementation 'io.jsonwebtoken:jjwt-api:0.12.6'
|
|
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6'
|
|
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6'
|
|
|
|
compileOnly 'org.projectlombok:lombok'
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
|
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
|
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
import java.time.LocalDateTime
|
|
import java.time.format.DateTimeFormatter
|
|
|
|
task archive(type: Tar) {
|
|
def timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))
|
|
archiveFileName = "finance-app-${version}-${timestamp}.tar.gz"
|
|
destinationDirectory = file("${projectDir}/distributions")
|
|
compression = Compression.GZIP
|
|
|
|
from(projectDir) {
|
|
exclude 'build/**'
|
|
exclude '.gradle/**'
|
|
exclude 'distributions/**'
|
|
exclude 'frontend/node_modules/**'
|
|
exclude 'frontend/node_modules*/**'
|
|
exclude 'frontend/node_modules*.zip'
|
|
exclude 'frontend/dist/**'
|
|
exclude '**/*.log'
|
|
exclude 'logs/**'
|
|
}
|
|
}
|