forked from osiegmar/logback-gelf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
116 lines (104 loc) · 3.11 KB
/
build.gradle.kts
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
114
115
116
plugins {
`java-library`
`maven-publish`
signing
pmd
checkstyle
jacoco
id("com.github.spotbugs") version "5.1.4"
}
group = "de.siegmar"
version = "5.0.1"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
withJavadocJar()
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
api("ch.qos.logback:logback-classic:1.4.14")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.assertj:assertj-core:3.11.1")
testImplementation("net.javacrumbs.json-unit:json-unit-assertj:2.38.0")
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.15.2")
testImplementation("org.bouncycastle:bcpkix-jdk18on:1.76")
}
tasks.test {
useJUnitPlatform()
finalizedBy(tasks.jacocoTestReport)
}
pmd {
isConsoleOutput = true
ruleSets = emptyList()
ruleSetFiles = files("${project.rootDir}/config/pmd/config.xml")
}
tasks.withType<com.github.spotbugs.snom.SpotBugsTask>().configureEach {
excludeFilter = file("${project.rootDir}/config/spotbugs/config.xml")
reports.maybeCreate("xml").required = false
reports.maybeCreate("html").required = true
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
}
}
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = "BRANCH"
value = "COVEREDRATIO"
minimum = "1.0".toBigDecimal()
}
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "logback-gelf"
from(components["java"])
pom {
name = "Logback GELF"
description = "Logback appender for sending GELF messages with zero additional dependencies."
url = "https://github.com/osiegmar/logback-gelf"
licenses {
license {
name = "GNU Lesser General Public License version 2.1"
url = "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt"
}
}
scm {
url = "https://github.com/osiegmar/logback-gelf"
connection = "scm:git:https://github.com/osiegmar/logback-gelf.git"
}
developers {
developer {
id = "osiegmar"
name = "Oliver Siegmar"
email = "[email protected]"
}
}
}
}
}
repositories {
maven {
name = "ossrh"
credentials(PasswordCredentials::class)
url = if (version.toString().endsWith("SNAPSHOT")) {
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
} else {
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
}
}
}
}
signing {
sign(publishing.publications["maven"])
}