-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
83 lines (74 loc) · 2.11 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
plugins {
id 'groovy'
id 'java-library'
id 'maven-publish'
id 'jacoco'
id 'org.sonarqube' version '3.3'
}
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()
}
}
}
}
}
dependencies {
// Spock Framework
testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0'
testImplementation 'org.codehaus.groovy:groovy-all:3.0.9'
// Spock Reports
testRuntimeClasspath( "com.athaydes:spock-reports:2.1.1-groovy-3.0" ) {
transitive = false // this avoids affecting your version of Groovy/Spock
}
// Required for spock-reports
testImplementation 'org.slf4j:slf4j-api:1.7.32'
testRuntimeClasspath 'org.slf4j:slf4j-simple:1.7.32'
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
csv.required = false
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
}