-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle.kts
70 lines (57 loc) · 1.94 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
plugins {
application
jacoco
id("jacoco-report-aggregation")
id("com.adarshr.test-logger") version "4.0.0"
}
repositories {
mavenCentral()
// Repository with JCardSim, Globalplatform, etc, ...
maven("https://javacard.pro/maven")
maven("https://deadcode.me/mvn")
}
dependencies {
implementation(project(":common"))
implementation(project(":applet"))
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
java {
sourceCompatibility = JavaVersion.VERSION_15
}
application {
applicationName = "ECTesterReader"
mainClass = "cz.crcs.ectester.reader.ECTesterReader"
version = "0.3.3"
}
tasks.named<Test>("test") {
useJUnitPlatform()
// Report is always generated after tests run
finalizedBy(tasks.named<JacocoReport>("testCodeCoverageReport"))
}
tasks.named<JacocoReport>("testCodeCoverageReport") {
reports {
html.required = true
html.outputLocation.set(layout.buildDirectory.dir("reports/jacoco/test/html"))
xml.required = true
xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/test/jacocoTestReport.xml"))
}
}
testlogger {
theme = com.adarshr.gradle.testlogger.theme.ThemeType.MOCHA
showStandardStreams = false
}
tasks.register<Jar>("uberJar") {
archiveFileName = "ECTesterReader.jar"
duplicatesStrategy = DuplicatesStrategy.WARN
from(sourceSets.main.get().output)
manifest {
attributes["Main-Class"] = application.mainClass
}
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it).matching { exclude("META-INF/*.DSA", "META-INF/*.SF", "META-INF/*.RSA", "META-INF/versions/*/module-info.class", "apdu4j/*") } }
})
}