-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle.kts
95 lines (85 loc) · 2.77 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
plugins {
`java-library`
`maven-publish`
signing
pmd
checkstyle
id("com.github.spotbugs") version "5.1.4"
}
group = "de.siegmar"
version = "2.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")
}
tasks.test {
useJUnitPlatform()
}
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
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "logback-awslogs-json-encoder"
from(components["java"])
pom {
name = "Logback awslogs JSON encoder"
description = "Logback encoder for producing JSON formatted log output for Amazon CloudWatch Logs Insights."
url = "https://github.com/osiegmar/logback-awslogs-json-encoder"
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-awslogs-json-encoder"
connection = "scm:git:https://github.com/osiegmar/logback-awslogs-json-encoder.git"
}
developers {
developer {
id = "osiegmar"
name = "Oliver Siegmar"
email = "oliver@siegmar.de"
}
}
}
}
}
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"])
}