-
Notifications
You must be signed in to change notification settings - Fork 60
/
build.gradle.kts
79 lines (64 loc) · 1.93 KB
/
build.gradle.kts
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
plugins {
id("java")
id("application")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("checkstyle")
id("com.github.vlsi.gradle-extensions") version "1.90"
}
group = "com.github.vlsi.ksar"
if (!project.hasProperty("release")) {
version = "$version-SNAPSHOT"
}
println("Building kSar $version")
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
application {
mainClass.set("net.atomique.ksar.Main")
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.slf4j:slf4j-api:2.0.16")
implementation("ch.qos.logback:logback-core:1.5.12")
implementation("ch.qos.logback:logback-classic:1.5.12")
implementation("com.itextpdf:itextpdf:5.5.13.4")
implementation("com.jcraft:jsch:0.1.55")
implementation("org.jfree:jfreechart:1.5.5")
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-Xlint:unchecked")
options.compilerArgs.add("-Xlint:deprecation")
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
}
val writeVersion by tasks.registering {
val outDir = project.layout.buildDirectory.dir("generated/version")
val versionText = version.toString()
inputs.property("ksar.version", versionText)
outputs.dir(outDir)
doLast {
outDir.get().apply {
asFile.mkdirs()
file("kSar.version").asFile.writeText(versionText)
}
}
}
sourceSets.main.get().resources.srcDir(writeVersion)
checkstyle {
config = project.resources.text.fromFile("src/main/checkstyle/ksar-checks.xml", "UTF-8")
}
tasks.jar {
manifest {
attributes(
"Implementation-Title" to "kSAR",
"Implementation-Version" to archiveVersion,
"SplashScreen-Image" to "logo_ksar.jpg",
)
}
}