-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
111 lines (97 loc) · 2.95 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
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
plugins {
`java-library`
`maven-publish`
signing
}
group = "io.err0"
version = "1.2.0"
repositories {
mavenCentral()
}
val junitJupiterVersion = "5.7.0"
val launcherClassName = "io.err0.log4j2.Main"
dependencies {
//implementation(platform("io.vertx:vertx-stack-depchain:$vertxVersion"))
//implementation("io.vertx:vertx-web-client")
//testImplementation("io.vertx:vertx-junit5")
testImplementation("org.junit.jupiter:junit-jupiter:$junitJupiterVersion")
// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation("com.google.code.gson:gson:2.8.7")
// the below are uncommented to allow me to use autocomplete to edit the
// java unit test cases, please comment these out as the tests don't actually
// depend on these:
// testImplementation("org.apache.logging.log4j:log4j-core:2.14.1")
// testImplementation("org.slf4j:slf4j-api:1.7.31")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
implementation("org.apache.logging.log4j:log4j-core:2.17.2")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events = setOf(PASSED, SKIPPED, FAILED)
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("err0-log4j2")
description.set("Connector for err0, log4j2")
url.set("https://github.com/Err0-io/err0-log4j2")
licenses {
license {
name.set("MIT license")
url.set("https://github.com/Err0-io/err0-log4j2/blob/main/LICENSE.txt")
}
}
developers {
developer {
id.set("err0package")
name.set("Err0.io packages")
email.set("[email protected]")
}
}
versionMapping {
//usage("java-api") {
// fromResolutionOf("runtimeClasspath")
//}
usage("java-runtime") {
fromResolutionResult()
}
}
scm {
connection.set("scm:git:https://github.com/Err0-io/err0-log4j2.git")
developerConnection.set("scm:git:ssh://[email protected]:Err0-io/err0-log4j2.git")
url.set("https://github.com/Err0-io/err0-log4j2")
}
}
}
}
repositories {
maven {
name = "sonatype"
setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.property("sonatypeUsername") as String?
password = project.property("sonatypePassword") as String?
}
}
}
}
signing {
sign(publishing.publications)
}
tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).addBooleanOption("html5", true)
}
}