-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
99 lines (84 loc) · 2.83 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
plugins {
java
`maven-publish`
signing
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "io.github.shroman"
version = "1.0.4-SNAPSHOT"
repositories {
mavenCentral()
}
val fluencyVersion = "2.7.0"
val junitVersion = "5.10.3"
val jacksonVersion = "2.16.1"
dependencies {
implementation("org.apache.logging.log4j:log4j-core:2.23.1")
implementation("org.komamitsu:fluency-core:$fluencyVersion")
implementation("org.komamitsu:fluency-fluentd:$fluencyVersion")
implementation("org.komamitsu:fluency-treasuredata:$fluencyVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
testImplementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
tasks.withType<Test> {
useJUnitPlatform()
}
buildscript {
repositories {
mavenCentral()
}
}
val ossrhUsername = project.findProperty("ossrhUsername").toString()
val ossrhPassword = project.findProperty("ossrhPassword").toString()
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
name.set("log4j-fluency")
description.set("Log4j Fluency Appender")
url.set("https://github.com/shroman/log4j-fluency")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("shroman")
name.set("Roman Shtykh")
}
}
scm {
connection.set("scm:git:git://github.com/shroman/log4j-fluency.git")
developerConnection.set("scm:git:[email protected]:shroman/log4j-fluency.git")
url.set("https://github.com/shroman/log4j-fluency")
}
}
}
}
repositories {
maven {
name = "OSSRH"
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
signing {
sign(publishing.publications["maven"])
sign(configurations.archives.get())
}