This repository was archived by the owner on Jun 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.gradle.kts
60 lines (53 loc) · 1.75 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
plugins {
java
}
group = "org.junit-pioneer"
description = "Convert junit 4 to junit 5 test"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
}
val junitVersion = "5.9.1"
dependencies {
implementation(group = "org.junit.jupiter", name = "junit-jupiter-api", version = junitVersion)
implementation(group = "org.junit.jupiter", name = "junit-jupiter-params", version = junitVersion)
implementation(group = "junit", name = "junit", version = "4.13.2")
implementation(group = "com.github.javaparser", name = "javaparser-core", version = "3.25.2")
implementation(group = "org.hamcrest", name = "hamcrest-all", version = "1.3")
implementation(group = "commons-io", name = "commons-io", version = "2.11.0")
implementation(group = "com.beust", name = "jcommander", version = "1.82")
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter-engine", version = junitVersion)
}
tasks {
compileJava {
options.encoding = "UTF-8"
}
compileTestJava {
options.encoding = "UTF-8"
}
test {
useJUnitPlatform()
filter {
includeTestsMatching("*Test")
}
testLogging {
setExceptionFormat("full")
}
}
register<Jar>("fatJar") {
group = "application"
manifest {
attributes["Implementation-Version"] = archiveVersion
attributes["Main-Class"] = "jb.CommandLineRunner"
}
archiveBaseName.set("${project.name}-fat")
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
with(jar.get() as CopySpec)
}
"build" {
dependsOn("fatJar")
}
}