Files
window-axis-innovators-box/build.gradle
tzdwindows 7 bf654b7ea3 feat(plugins): 实现插件系统并优化加载过程
- 新增 BoxClassLoader、IClassTransformer、LoadingCorePlugin 等核心类
- 重构 Main 类,采用多线程和 ProgressBarManager 优化加载过程
- 完善 PluginLoader 类,支持核心插件和字节码转换器的加载- 重定向系统输出到 Log4j2,提高日志管理的灵活性
2025-02-10 15:32:22 +08:00

57 lines
1.7 KiB
Groovy

plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'edu.sc.seis.launch4j' version '2.5.4'
}
def requiredJavaVersion = 20
def currentJavaVersion = JavaVersion.current().majorVersion.toInteger()
if (currentJavaVersion != requiredJavaVersion) {
throw new GradleException("构建需要 JDK ${requiredJavaVersion},但当前是 JDK ${currentJavaVersion}。请更换 JDK 环境。")
}
group = 'com.axis.innovators.box'
version = '1.0-SNAPSHOT'
repositories {
mavenLocal()
maven { url "https://maven.aliyun.com/repository/public" }
mavenCentral()
jcenter()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
implementation 'org.commonmark:commonmark:0.24.0'
implementation 'org.commonjava.googlecode.markdown4j:markdown4j:2.2-cj-1.1'
implementation 'com.google.code.gson:gson:2.8.9'
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-slf4j-impl:2.20.0'
implementation 'org.ow2.asm:asm:7.1'
implementation 'org.ow2.asm:asm-commons:7.1'
implementation 'org.ow2.asm:asm-analysis:7.1'
implementation 'org.ow2.asm:asm-util:7.0'
implementation 'org.ow2.asm:asm-tree:7.1'
}
jar {
manifest {
attributes 'Main-Class': 'com.axis.innovators.box.Main'
}
}
application {
mainClass = 'com.axis.innovators.box.Main'
applicationDefaultJvmArgs = [
"-Djava.system.class.loader=com.axis.innovators.box.plugins.BoxClassLoader"
]
}
test {
useJUnitPlatform()
}