-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (73 loc) · 2.31 KB
/
build.gradle
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 {
id 'java'
id 'jacoco'
id "org.sonarqube" version "3.0"
}
group 'ch.css.coaching.hearts'
version '0.1.0-SNAPSHOT'
sourceCompatibility = 14
targetCompatibility = 14
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
ext {
helidonversion = '2.0.2'
}
test {
useJUnitPlatform()
}
repositories {
mavenCentral()
}
dependencies {
// import Helidon BOM
implementation enforcedPlatform("io.helidon:helidon-dependencies:${project.helidonversion}")
implementation 'io.helidon.webserver:helidon-webserver'
implementation 'io.helidon.webserver:helidon-webserver-tyrus'
implementation 'io.helidon.media:helidon-media-jsonp'
implementation 'io.helidon.config:helidon-config-yaml'
implementation 'io.helidon.health:helidon-health'
implementation 'io.helidon.health:helidon-health-checks'
implementation 'io.helidon.metrics:helidon-metrics'
compile 'com.fasterxml.jackson.core:jackson-databind:2.0.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api'
testImplementation 'io.helidon.webclient:helidon-webclient'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testImplementation("org.assertj:assertj-core:3.16.1")
testImplementation 'org.awaitility:awaitility:4.0.3'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.1.0'
}
// define a custom task to copy all dependencies in the runtime classpath
// into build/libs/libs
// uses built-in Copy
task copyLibs(type: Copy) {
from configurations.runtimeClasspath
into 'build/libs/libs'
}
// add it as a dependency of built-in task 'assemble'
copyLibs.dependsOn jar
assemble.dependsOn copyLibs
// default jar configuration
// set the main classpath
// add each jar under build/libs/libs into the classpath
jar {
archiveFileName = "${project.name}.jar"
manifest {
attributes ('Main-Class': 'ch.css.coaching.hearts.Main',
'Class-Path': configurations.runtimeClasspath.files.collect { "libs/$it.name" }.join(' ')
)
}
}
sonarqube {
properties {
property "sonar.projectKey", "damir-majer_css-hearts"
property "sonar.organization", "damir-majer"
property "sonar.host.url", "https://sonarcloud.io"
}
}
jacocoTestReport {
reports {
xml.enabled true
}
}
test.finalizedBy jacocoTestReport