-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
113 lines (97 loc) · 2.71 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "com.github.ben-manes:gradle-versions-plugin:0.38.0"
}
}
plugins {
id 'maven-publish'
}
subprojects {
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
apply plugin: 'com.github.ben-manes.versions'
group 'com.jamf.reporting'
version '1.1.0'
sourceCompatibility = JavaVersion.VERSION_17
java {
withJavadocJar()
withSourcesJar()
}
checkstyle {
toolVersion '8.11'
maxWarnings 0
maxErrors 0
}
repositories {
mavenCentral()
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/jamf/testrail-reporting"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
mavenJava(MavenPublication) {
groupId group
artifactId project.name
version version
from components.java
}
}
}
dependencies {
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.1'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.1'
implementation group: 'org.apache.groovy', name: 'groovy', version: '4.0.5'
testRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-commons', version: '1.9.0'
testRuntimeOnly group: 'net.bytebuddy', name: 'byte-buddy', version: '1.12.16'
testRuntimeOnly group: 'org.objenesis', name: 'objenesis', version: '3.3'
testImplementation group: 'org.spockframework', name: 'spock-core', version: '2.2-groovy-4.0'
}
test {
include '**/*Spec*'
outputs.upToDateWhen {false}
testLogging {
events "passed", "skipped", "failed"
}
afterSuite {desc, result ->
if (!desc.parent) {
println("${result.resultType} " +
"(${result.testCount} tests, " +
"${result.successfulTestCount} successes, " +
"${result.failedTestCount} failures, " +
"${result.skippedTestCount} skipped)")
}
}
useJUnitPlatform()
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
dependencyUpdates.resolutionStrategy {
componentSelection {rules ->
rules.all {ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'rc1', 'rc-1', 'cr', 'm', 'preview', 'b', 'ea'].any {qualifier ->
selection.candidate.version ==~ /(?i).*[.-]$qualifier[.\d\w-+]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}
}