-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
85 lines (74 loc) · 2.32 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
plugins {
id 'java-library'
id 'signing'
id 'maven-publish'
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = 'com.github.pjfanning'
version = '1.6.2-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
implementation 'com.github.ben-manes.caffeine:caffeine:2.9.3'
testImplementation 'junit:junit:4.13.2'
}
tasks.named('jar') {
manifest {
attributes('Automatic-Module-Name': 'com.github.pjfanning.jackson.caffeinecache')
}
}
compileTestJava.dependsOn('copyLicenseToBuildResources')
jar.dependsOn('copyLicenseToBuildResources')
javadoc.dependsOn('copyLicenseToBuildResources')
java {
withJavadocJar()
withSourcesJar()
}
nexusPublishing {
repositories {
sonatype()
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = 'jackson-caffeine-cache'
description = 'A Caffeine based type cache for Jackson.'
url = 'https://github.com/pjfanning/jackson-caffeine-cache'
inceptionYear = '2019'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'pjfanning'
name = 'PJ Fanning'
}
}
scm {
url = 'https://github.com/pjfanning/jackson-caffeine-cache'
connection = 'scm:git://github.com/pjfanning/jackson-caffeine-cache.git'
developerConnection = 'scm:git://github.com/pjfanning/jackson-caffeine-cache.git'
}
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
tasks.register('copyLicenseToBuildResources', Copy) {
from layout.projectDirectory.file("LICENSE")
into layout.buildDirectory.dir("resources/main/META-INF")
}