Files
ledgerly/build.gradle
T
rosercode 9981e77bf1 feat: 扩展账单导入(zip/美团/招行/交行)并新增批量删除与动态支付方式
- 账单导入支持 zip 压缩包,加密包自动检测并弹窗输入解压密码(引入 zip4j)
- 新增美团、招商银行、交通银行账单解析器及对应账单类型
- 支付方式列表改为后端动态获取,前端筛选与新增/编辑表单动态渲染
- 支付方式筛选从「更多筛选」移至常用筛选栏,移除「银行卡」选项
- 收支记录支持多选批量删除
- 补充相关三语文案并透传业务错误码
2026-09-19 02:46:35 +08:00

109 lines
3.5 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 '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.boot:spring-boot-starter-mail'
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'
// SQLite 驱动,用于本地文件数据库
runtimeOnly 'org.xerial:sqlite-jdbc:3.46.1.3'
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'
// zip 压缩包解析(支持带密码的 ZipCrypto / AES 加密压缩包)
implementation 'net.lingala.zip4j:zip4j:2.11.5'
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'
// MapStruct:编译期生成实体与视图对象之间的属性映射实现
implementation 'org.mapstruct:mapstruct:1.6.3'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'
// 使 MapStruct 能识别 Lombok 生成的 getter/setter
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'
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()
}
// ===== 前端构建与打包 =====
def frontendDir = file("${projectDir}/frontend")
def frontendDistDir = file("${frontendDir}/dist")
// 解析 npm 可执行文件:优先使用 NODE_HOME,其次使用 PATH 中的 npm
def resolveNpm = {
def nodeHome = System.getenv('NODE_HOME')
return nodeHome ? "${nodeHome}/bin/npm" : 'npm'
}
// 安装前端依赖(node_modules 存在且 package.json 未变化时自动跳过)
tasks.register('npmInstall', Exec) {
group = 'frontend'
description = '安装前端依赖'
workingDir frontendDir
commandLine resolveNpm(), 'install'
inputs.file("${frontendDir}/package.json")
outputs.dir("${frontendDir}/node_modules")
}
// 构建前端产物
tasks.register('frontendBuild', Exec) {
group = 'frontend'
description = '构建前端产物(npm run build)'
dependsOn 'npmInstall'
workingDir frontendDir
commandLine resolveNpm(), 'run', 'build'
inputs.dir("${frontendDir}/src")
inputs.file("${frontendDir}/package.json")
inputs.file("${frontendDir}/index.html")
inputs.file("${frontendDir}/vite.config.ts")
outputs.dir(frontendDistDir)
}
// 将前端产物打入可执行 jar 的静态资源目录,实现前后端一体化部署
tasks.named('bootJar') {
dependsOn 'frontendBuild'
from(frontendDistDir) {
into 'BOOT-INF/classes/static'
}
}