- 更新 shared_proto_db/metadata/000003.log 文件内容 - 更新 Site Characteristics Database/00003.log 文件内容 - 添加新的数据库条目和元数据记录 - 保持数据库文件格式的一致性 - 删除Vivid2D的内容 - 重写启动加载界面
254 lines
9.1 KiB
Groovy
254 lines
9.1 KiB
Groovy
import org.gradle.internal.os.OperatingSystem
|
|
import java.time.LocalDateTime
|
|
import java.time.format.DateTimeFormatter
|
|
|
|
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
id 'org.openjfx.javafxplugin' version '0.1.0'
|
|
id 'org.springframework.boot' version '3.2.0'
|
|
id 'io.spring.dependency-management' version '1.1.4'
|
|
id 'edu.sc.seis.launch4j' version '2.5.4'
|
|
}
|
|
|
|
group = 'com.axis.innovators.box'
|
|
version = '0.0.1'
|
|
|
|
// JDK 版本检查
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(20)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
|
maven { url 'https://jitpack.io' }
|
|
mavenCentral()
|
|
}
|
|
|
|
// 操作系统 Native 标识符
|
|
def lwjglNatives = ""
|
|
if (OperatingSystem.current().isWindows()) {
|
|
lwjglNatives = "natives-windows"
|
|
} else if (OperatingSystem.current().isLinux()) {
|
|
lwjglNatives = "natives-linux"
|
|
} else if (OperatingSystem.current().isMacOsX()) {
|
|
lwjglNatives = System.getProperty("os.arch") == "aarch64" ? "natives-macos-arm64" : "natives-macos"
|
|
}
|
|
|
|
javafx {
|
|
version = "21"
|
|
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.web', 'javafx.swing' ]
|
|
}
|
|
|
|
// 排除冲突的日志和旧版 FX
|
|
configurations {
|
|
all*.exclude group: 'org.openjfx', module: 'javafx'
|
|
all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
|
|
}
|
|
|
|
dependencies {
|
|
// === 测试框架 ===
|
|
testImplementation platform('org.junit:junit-bom:5.10.0')
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
testImplementation 'org.springframework.security:spring-security-test'
|
|
|
|
// === 开发工具 ===
|
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
|
|
|
// === JnaFileChooser & Swing ===
|
|
implementation 'com.github.steos.jnafilechooser:jnafilechooser-api:1.1.2'
|
|
implementation 'com.github.steos.jnafilechooser:jnafilechooser-win32:1.1.2'
|
|
implementation 'org.swinglabs:swingx:1.6.1'
|
|
|
|
// === 本地库文件 ===
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
// === AI (DJL) ===
|
|
implementation platform('ai.djl:bom:0.35.0')
|
|
implementation 'ai.djl:api'
|
|
implementation 'ai.djl:model-zoo'
|
|
implementation 'ai.djl.pytorch:pytorch-model-zoo:0.35.0'
|
|
implementation 'ai.djl.pytorch:pytorch-engine'
|
|
implementation 'ai.djl:basicdataset'
|
|
implementation 'ai.djl.onnxruntime:onnxruntime-engine'
|
|
runtimeOnly 'ai.djl.pytorch:pytorch-native-cpu:2.7.1'
|
|
runtimeOnly 'ai.djl.onnxruntime:onnxruntime-native-cpu:1.3.0'
|
|
|
|
// === 核心工具库 ===
|
|
implementation 'com.google.code.gson:gson:2.10.1'
|
|
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
|
|
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
|
|
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0'
|
|
implementation 'commons-io:commons-io:2.18.0'
|
|
implementation 'com.google.guava:guava:31.1-jre'
|
|
implementation 'net.java.dev.jna:jna:5.13.0'
|
|
implementation 'net.java.dev.jna:jna-platform:5.13.0'
|
|
implementation 'org.apache.commons:commons-math3:3.6.1'
|
|
implementation 'org.apache.commons:commons-compress:1.23.0'
|
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
|
|
|
|
// === 字节码操作 ===
|
|
implementation 'org.ow2.asm:asm:9.7.1'
|
|
implementation 'org.ow2.asm:asm-commons:9.7.1'
|
|
implementation 'org.ow2.asm:asm-analysis:9.7.1'
|
|
implementation 'org.ow2.asm:asm-util:9.7.1'
|
|
implementation 'org.ow2.asm:asm-tree:9.7.1'
|
|
implementation 'net.bytebuddy:byte-buddy:1.17.6'
|
|
|
|
// === 反编译工具 ===
|
|
implementation 'org.bitbucket.mstrobel:procyon-core:0.6.0'
|
|
implementation 'org.bitbucket.mstrobel:procyon-compilertools:0.6.0'
|
|
implementation 'org.benf:cfr:0.152'
|
|
|
|
// === Java 解析与分析 ===
|
|
implementation 'com.github.javaparser:javaparser-core:3.25.1'
|
|
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.25.9'
|
|
|
|
// === 文本处理 ===
|
|
implementation 'org.commonmark:commonmark:0.24.0'
|
|
implementation 'org.commonjava.googlecode.markdown4j:markdown4j:2.2-cj-1.1'
|
|
implementation 'com.vladsch.flexmark:flexmark:0.64.8'
|
|
|
|
// === Web 和网络 ===
|
|
implementation 'org.jsoup:jsoup:1.17.2'
|
|
implementation 'org.json:json:20231013'
|
|
implementation 'org.openjfx:javafx-web:21'
|
|
|
|
// === UI 框架 ===
|
|
implementation 'com.formdev:flatlaf:3.2.1'
|
|
implementation 'com.formdev:flatlaf-extras:3.2.1'
|
|
implementation 'com.formdev:flatlaf-intellij-themes:3.2.1'
|
|
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.2'
|
|
implementation 'org.fxmisc.richtext:richtextfx:0.11.0'
|
|
implementation 'org.controlsfx:controlsfx:11.1.2'
|
|
implementation 'com.dlsc.formsfx:formsfx-core:11.6.0'
|
|
implementation 'com.dustinredmond.fxtrayicon:FXTrayIcon:4.0.1'
|
|
|
|
// === 代码编辑器 ===
|
|
implementation 'com.fifesoft:rsyntaxtextarea:3.5.4'
|
|
implementation 'com.fifesoft:rstaui:3.3.1'
|
|
implementation 'com.fifesoft:languagesupport:3.3.0'
|
|
implementation 'com.fifesoft:autocomplete:3.3.2'
|
|
|
|
// === LWJGL 图形引擎 ===
|
|
def lwjglVersion = "3.3.6"
|
|
implementation "org.lwjgl:lwjgl:$lwjglVersion"
|
|
implementation "org.lwjgl:lwjgl-stb:$lwjglVersion"
|
|
implementation "org.lwjgl:lwjgl-glfw:$lwjglVersion"
|
|
implementation "org.lwjgl:lwjgl-opengl:$lwjglVersion"
|
|
implementation "org.lwjgl:lwjgl-jawt:$lwjglVersion"
|
|
|
|
implementation("com.github.LWJGLX:lwjgl3-awt:bc8daf521a") {
|
|
exclude group: "org.lwjgl"
|
|
}
|
|
|
|
// LWJGL Natives
|
|
runtimeOnly "org.lwjgl:lwjgl:$lwjglVersion:$lwjglNatives"
|
|
runtimeOnly "org.lwjgl:lwjgl-glfw:$lwjglVersion:$lwjglNatives"
|
|
runtimeOnly "org.lwjgl:lwjgl-opengl:$lwjglVersion:$lwjglNatives"
|
|
runtimeOnly "org.lwjgl:lwjgl-stb:$lwjglVersion:$lwjglNatives"
|
|
|
|
// 其他图形库
|
|
implementation 'com.badlogicgames.gdx:gdx:1.12.1'
|
|
implementation 'org.joml:joml:1.10.7'
|
|
implementation 'com.kitfox.svg:svg-salamander:1.0'
|
|
implementation 'net.sourceforge.plantuml:plantuml:8059'
|
|
implementation 'com.twelvemonkeys.imageio:imageio-psd:3.12.0'
|
|
|
|
// === 图像处理 ===
|
|
implementation 'com.madgag:animated-gif-lib:1.4'
|
|
implementation 'org.bytedeco:javacv-platform:1.5.7'
|
|
implementation 'org.bytedeco:javacpp-platform:1.5.7'
|
|
|
|
// === 编程语言支持 ===
|
|
implementation 'org.python:jython-standalone:2.7.3'
|
|
implementation 'org.graalvm.python:python-embedding:24.2.1'
|
|
|
|
// === 系统交互 ===
|
|
implementation 'com.github.kwhat:jnativehook:2.2.2'
|
|
implementation 'com.1stleg:jnativehook:2.1.0'
|
|
|
|
// === 数据库 ===
|
|
runtimeOnly 'com.mysql:mysql-connector-j'
|
|
implementation 'mysql:mysql-connector-java:8.0.33'
|
|
implementation 'com.h2database:h2:2.2.220'
|
|
implementation 'org.xerial:sqlite-jdbc:3.41.2.1'
|
|
implementation 'org.postgresql:postgresql:42.6.0'
|
|
|
|
// === 伪终端与测试容器 ===
|
|
implementation 'org.jetbrains.pty4j:pty4j:0.12.13'
|
|
implementation 'org.testcontainers:testcontainers:1.19.0'
|
|
|
|
// === 音频处理 ===
|
|
implementation 'jflac:jflac:1.3'
|
|
implementation 'com.github.axet:TarsosDSP:2.4'
|
|
implementation 'com.googlecode.soundlibs:mp3spi:1.9.5-1'
|
|
implementation 'com.googlecode.soundlibs:vorbisspi:1.0.3-2'
|
|
implementation 'com.googlecode.soundlibs:jorbis:0.0.17-2'
|
|
|
|
// === 语音识别 ===
|
|
implementation 'com.alphacephei:vosk:0.3.45'
|
|
|
|
// === 浏览器引擎 ===
|
|
implementation 'me.friwi:jcefmaven:122.1.10'
|
|
|
|
// === 中文处理 ===
|
|
implementation 'com.belerweb:pinyin4j:2.5.1'
|
|
|
|
// === 安全认证 ===
|
|
implementation 'cn.dev33:sa-token-spring-boot-starter:1.44.0'
|
|
implementation 'org.casbin:casdoor-java-sdk:1.37.0'
|
|
}
|
|
|
|
// 自动生成构建信息文件
|
|
tasks.register('generateBuildProperties') {
|
|
group = 'build'
|
|
doLast {
|
|
def resDir = file("src/main/resources/build")
|
|
resDir.mkdirs()
|
|
def propertiesFile = new File(resDir, 'build.properties')
|
|
propertiesFile.text = """# Auto-generated build information
|
|
version=${project.version}
|
|
buildTimestamp=${LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME)}
|
|
buildSystem=${OperatingSystem.current().isWindows() ? "WINDOWS" : "UNIX"}
|
|
"""
|
|
}
|
|
}
|
|
|
|
compileJava.dependsOn generateBuildProperties
|
|
|
|
// 复制依赖包到构建目录
|
|
tasks.register('copyDependencies', Copy) {
|
|
group = "build"
|
|
from configurations.runtimeClasspath
|
|
into "$buildDir/libs/libs"
|
|
}
|
|
|
|
tasks.jar {
|
|
dependsOn copyDependencies
|
|
archiveBaseName.set("${rootProject.name}")
|
|
manifest {
|
|
attributes(
|
|
'Main-Class': 'com.axis.innovators.box.Main',
|
|
'Class-Path': configurations.runtimeClasspath.files.collect { "libs/${it.name}" }.join(' ')
|
|
)
|
|
}
|
|
}
|
|
|
|
application {
|
|
mainClass = 'com.axis.innovators.box.Main'
|
|
}
|
|
|
|
tasks.register('runBoxClient', JavaExec) {
|
|
group = "run"
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
mainClass = "com.axis.innovators.box.Main"
|
|
jvmArgs = [
|
|
"-Dfile.encoding=UTF-8",
|
|
"-Djava.system.class.loader=com.axis.innovators.box.plugins.BoxClassLoader"
|
|
]
|
|
} |