-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
86 lines (76 loc) · 2.22 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
plugins {
id 'groovy'
id 'java-library'
id 'maven-publish'
id 'jacoco'
id 'org.sonarqube' version '3.4.0.2513'
}
sonarqube {
properties {
property "sonar.projectKey", "rabestro_algorithms"
property "sonar.organization", "rabestro"
property "sonar.host.url", "https://sonarcloud.io"
}
}
group 'lv.id.jc'
version '1.1-SNAPSHOT'
repositories {
mavenCentral()
}
// Configures the publishing
publishing {
repositories {
// The target repository
maven {
// Choose whatever name you want
name = "Algorithms"
// The url of the repository, where the artifacts will be published
url = "https://maven.pkg.github.com/rabestro/algorithms"
credentials {
// The credentials (described in the next section)
username = project.findProperty("gpr.user")
password = project.findProperty("gpr.key")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
// Fixes the error with dynamic versions when using Spring Boot
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult(null)
}
}
}
}
}
dependencies {
// Spock Framework
testImplementation 'org.spockframework:spock-core:2.2-groovy-3.0'
testImplementation 'org.codehaus.groovy:groovy-all:3.0.12'
// Spock Reports
testRuntimeClasspath('com.athaydes:spock-reports:2.3.1-groovy-3.0') {
transitive = false // this avoids affecting your version of Groovy/Spock
}
// Required for spock-reports
testImplementation 'org.slf4j:slf4j-api:2.0.1'
testRuntimeClasspath 'org.slf4j:slf4j-simple:2.0.1'
// JUnit 5 Parameterized Tests
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.1'
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
csv.required = false
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}