-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
97 lines (84 loc) · 2.41 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
plugins {
id 'java'
id 'java-library'
id 'signing'
id "maven-publish"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.11.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
}
group = 'com.dnsimple'
version = '2.0.0'
description = 'dnsimple-java'
java {
sourceCompatibility = '1.17'
targetCompatibility = '1.17'
withJavadocJar()
withSourcesJar()
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
publishing {
publications {
mavenJava(MavenPublication) {
groupId = group
artifactId = description
version = version
from components.java
pom {
name = 'dnsimple-java'
description = 'DNSimple Java Bindings'
url = 'https://github.com/dnsimple/dnsimple-java'
properties = [:]
licenses {
license {
name = 'MIT'
url = 'http://choosealicense.com/licenses/mit/'
}
}
organization {
name = 'DNSimple'
url = 'https://dnsimple.com'
}
developers {
developer {
name = 'DNSimple'
email = '[email protected]'
organization = 'DNSimple'
organizationUrl = 'https://dnsimple.com'
}
}
scm {
connection = 'scm:git:[email protected]:dnsimple/dnsimple-java.git'
developerConnection = 'scm:git:[email protected]:dnsimple/dnsimple-java.git'
url = '[email protected]:dnsimple/dnsimple-java.git'
}
}
}
}
}
signing {
def signingKeyId = findProperty("signingKeyId")
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications.mavenJava
}
nexusPublishing {
repositories {
sonatype()
}
}
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
test {
testLogging {
exceptionFormat = 'full'
}
}