-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
89 lines (70 loc) · 2.1 KB
/
build.gradle.kts
File metadata and controls
89 lines (70 loc) · 2.1 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`maven-publish`
kotlin("jvm") version "1.8.20"
}
repositories {
mavenCentral()
mavenLocal()
}
java {
withJavadocJar()
withSourcesJar()
}
val apiVersion = "v0.0.1"
val appGroup = "com.softwareplace.jsonlogger"
group = appGroup
version = apiVersion
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "17"
}
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = appGroup
artifactId = "json-logger"
version = apiVersion
from(components["java"])
}
create<MavenPublication>("release") {
from(components["java"])
groupId = "com.github.softwareplace"
artifactId = "json-logger"
version = apiVersion
}
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.0")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.0")
implementation("ch.qos.logback:logback-classic:1.2.11")
implementation("org.apache.logging.log4j:log4j-to-slf4j:2.13.3")
implementation("org.slf4j:jul-to-slf4j:1.7.30")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.0")
testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
testImplementation("io.mockk:mockk:1.13.2")
}
tasks.withType<Test> {
description = "Runs unit tests"
useJUnitPlatform()
testLogging {
showExceptions = true
showStackTraces = true
exceptionFormat = FULL
events = mutableSetOf(
FAILED,
SKIPPED
)
}
}