forked from inferno-framework/fhir-validator-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
88 lines (71 loc) · 2.29 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
80
81
82
83
84
85
86
87
88
plugins {
java
application
checkstyle
jacoco
}
group = "org.mitre"
repositories {
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
dependencies {
// https://chat.fhir.org/#narrow/stream/179166-implementers/topic/New.20validator.20JAR.20location
// the ig-publisher uses this one too
// https://github.com/HL7/fhir-ig-publisher/blob/master/pom.xml#L68
implementation("ca.uhn.hapi.fhir", "org.hl7.fhir.validation", "5.1.7")
// validator dependencies (should be able to get these automatically?)
implementation("org.apache.commons","commons-compress", "1.19")
implementation("org.apache.httpcomponents", "httpclient", "4.5.10")
implementation("org.fhir", "ucum", "1.0.2")
// GSON for our JSON needs
implementation("com.google.code.gson", "gson", "2.8.6")
implementation("org.slf4j", "slf4j-log4j12", "1.7.30")
// Web Server
implementation("com.sparkjava", "spark-core", "2.9.1")
// Testing stuff
testImplementation("org.junit.jupiter", "junit-jupiter", "5.5.2")
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
application {
mainClassName = "org.mitre.inferno.App"
}
checkstyle {
toolVersion = "8.25"
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
val testCoverage by tasks.registering {
group = "verification"
description = "Runs the unit tests with coverage."
dependsOn(":test", ":jacocoTestReport")
val jacocoTestReport = tasks.findByName("jacocoTestReport")
jacocoTestReport?.mustRunAfter(tasks.findByName("test"))
}
val fatJar = task("fatJar", type = Jar::class) {
baseName = "${project.name}-fat"
manifest {
attributes["Implementation-Title"] = "FHIR Validator Wrapper"
attributes["Implementation-Version"] = project.version
attributes["Main-Class"] = "org.mitre.inferno.rest.Validate"
}
from(configurations.runtimeClasspath.get().map({ if (it.isDirectory) it else zipTree(it) }))
with(tasks.jar.get() as CopySpec)
}
tasks {
"build" {
dependsOn(fatJar)
}
}
val setVersion = tasks.processResources {
expand("version" to project.version)
inputs.property("appVersion", project.version)
}