forked from dnsimple/dnsimple-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
98 lines (85 loc) · 2.66 KB
/
build.gradle
File metadata and controls
98 lines (85 loc) · 2.66 KB
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 'maven-publish'
id 'signing'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.code.gson:gson:2.8.7'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
}
group = 'com.dnsimple'
version = '0.9.1'
description = 'dnsimple-java'
sourceCompatibility = '1.11'
targetCompatibility = '1.11'
java {
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 = 'support@dnsimple.com'
organization = 'DNSimple'
organizationUrl = 'https://dnsimple.com'
}
}
scm {
connection = 'scm:git:git@github.com:dnsimple/dnsimple-java.git'
developerConnection = 'scm:git:git@github.com:dnsimple/dnsimple-java.git'
url = 'git@github.com:dnsimple/dnsimple-java.git'
}
}
repositories {
maven {
def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
url = isReleaseVersion ? releaseRepo : snapshotRepo
credentials {
username = project.hasProperty('ossrhUsername') ? ossrhUsername : "Unknown user"
password = project.hasProperty('ossrhPassword') ? ossrhPassword : "Unknown password"
}
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
test {
testLogging {
exceptionFormat = 'full'
}
}