-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
87 lines (77 loc) · 2.27 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
87 lines (77 loc) · 2.27 KB
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
plugins {
`java-library`
`maven-publish`
eclipse
jacoco
}
group = "com.robertsmieja"
version = "0.1.0"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.apache.commons:commons-lang3:3.20.0")
implementation("org.apache.commons:commons-collections4:4.5.0")
implementation("org.junit.jupiter:junit-jupiter-api:6.0.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:6.0.1")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.1")
}
tasks.named<Test>("test") {
useJUnitPlatform()
}
tasks.named<JavaCompile>("compileJava") {
options.compilerArgs.add("-Xlint:all")
options.compilerArgs.add("-Xlint:-processing")
}
/* Code Coverage */
jacoco {
toolVersion = "0.8.12"
}
tasks.named<JacocoReport>("jacocoTestReport") {
reports {
xml.required = true
csv.required = false
html.required = true
}
}
tasks.named("check") {
dependsOn(tasks.named("jacocoTestReport"))
}
/* Publishing configuration */
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name = "Java Test Utils"
description = "A set of common utilities for testing Java code with JUnit"
url = "https://github.com/robertsmieja/${project.name}"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "robertsmieja"
name = "Robert Smieja"
email = "robertsmieja@robertsmieja.com"
}
}
scm {
connection = "scm:git:git://github.com/robertsmieja/${project.name}.git"
developerConnection = "scm:git:ssh://github.com:robertsmieja/${project.name}.git"
url = "https://github.com/robertsmieja/${project.name}"
}
}
}
}
}