-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
90 lines (69 loc) · 2.18 KB
/
build.gradle
File metadata and controls
90 lines (69 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
plugins {
id 'java'
id 'application'
}
group = 'com.github.charles-works'
version = '1.0-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
}
dependencies {
// JSON处理
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
// PDF报告生成
implementation 'com.itextpdf:kernel:7.2.5'
implementation 'com.itextpdf:io:7.2.5'
implementation 'com.itextpdf:layout:7.2.5'
implementation 'com.itextpdf:html2pdf:4.0.5'
// Markdown处理
implementation 'com.vladsch.flexmark:flexmark-all:0.64.8'
// 图表生成
implementation 'org.jfree:jfreechart:1.5.3'
// 约束规划求解器
implementation 'org.choco-solver:choco-solver:4.10.11'
// 数学计算库
implementation 'org.apache.commons:commons-math3:3.6.1'
// 数据库连接
implementation 'org.postgresql:postgresql:42.6.0'
// 连接池
implementation 'com.zaxxer:HikariCP:5.0.1'
// 日志
implementation 'org.slf4j:slf4j-api:2.0.7'
implementation 'ch.qos.logback:logback-classic:1.4.8'
// 测试框架
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3'
testImplementation 'org.mockito:mockito-core:5.4.0'
// REST框架
implementation 'io.javalin:javalin:5.6.1'
// 命令行解析
implementation 'info.picocli:picocli:4.7.4'
}
application {
mainClass = 'com.github.charles.works.simelevatortriffic.Main'
}
// 示例程序
task runPdfExample(type: JavaExec) {
mainClass = 'com.github.charles.works.simelevatortriffic.example.PdfReportExample'
classpath = sourceSets.main.runtimeClasspath
}
test {
useJUnitPlatform()
}
// 配置编译选项
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// 添加生成报告的任务
task generateReports(type: JavaExec) {
mainClass = 'com.github.charles.works.simelevatortriffic.util.ReportGeneratorUtil'
classpath = sourceSets.main.runtimeClasspath
args 'generate-reports'
}
// 添加一个任务来构建项目并生成报告
task buildAndGenerateReports {
dependsOn build, generateReports
}