forked from osiegmar/logback-awslogs-json-encoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (92 loc) · 3.06 KB
/
build.gradle
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
plugins {
id "com.github.spotbugs" version "1.6.6"
}
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'signing'
apply plugin: 'maven-publish'
group = "de.siegmar"
archivesBaseName = "logback-awslogs-json-encoder"
version = "1.0.0"
sourceCompatibility = 1.8
repositories {
jcenter()
}
dependencies {
compile 'ch.qos.logback:logback-classic:1.2.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.2'
testCompile 'com.google.guava:guava:27.0.1-jre'
testCompile 'com.fasterxml.jackson.core:jackson-databind:2.9.7'
}
test {
useJUnitPlatform()
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
checkstyle {
configFile = file("${rootDir}/config/checkstyle/checkstyle.xml")
configProperties = [samedir: "${rootDir}/config/checkstyle", project_loc: "${rootDir}"]
}
if (hasProperty('signing.keyId')) {
signing {
sign configurations.archives
}
}
if (hasProperty('ossrhUsername')) {
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = jar.baseName
from components.java
artifact sourcesJar
artifact javadocJar
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 = 'http://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 = '[email protected]'
}
}
}
}
}
repositories {
maven {
credentials {
username "$ossrhUsername"
password "$ossrhPassword"
}
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
signing {
sign publishing.publications.mavenJava
}
}