-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathbuild.gradle
135 lines (120 loc) · 3.85 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'java-library'
id 'maven-publish'
id "signing"
}
def getProperty = { property ->
if (!project.hasProperty(property)) {
throw new GradleException("${property} property must be set")
}
return project.property(property)
}
repositories {
mavenCentral()
}
group = "com.pusher"
version = "1.3.4"
description = "Pusher HTTP Client"
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
withJavadocJar()
}
dependencies {
implementation 'org.apache.httpcomponents:httpclient:4.5.13'
implementation 'org.asynchttpclient:async-http-client:3.0.1'
implementation 'com.google.code.gson:gson:2.8.9'
testImplementation 'org.apache.httpcomponents:httpclient:4.5.13'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.jmock:jmock-junit5:2.12.0'
testImplementation 'org.jmock:jmock-imposters:2.12.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
}
processResources {
filter(ReplaceTokens, tokens: [
version: project.version
])
}
javadoc {
title "Pusher HTTP Java"
options.linkSource = true
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes(
'Created-By': 'Pusher',
'Implementation-Vendor': 'Pusher',
'Implementation-Title': 'Pusher HTTP Java',
'Implementation-Version': version
)
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'pusher-http-java'
from components.java
pom {
name = 'Pusher HTTP Client'
packaging = 'jar'
artifactId = 'pusher-http-java'
description = "This is a Java library for interacting with Pusher.com's HTTP API."
url = 'http://github.com/pusher/pusher-http-java'
scm {
connection = 'scm:git:[email protected]:pusher/pusher-http-java'
developerConnection = 'scm:git:[email protected]:pusher/pusher-http-java'
url = 'http://github.com/pusher/pusher-http-java'
}
licenses {
license {
name = 'MIT'
url = 'https://raw.github.com/pusher/pusher-http-java/master/LICENCE.txt'
distribution = 'https://raw.github.com/pusher/pusher-http-java/mvn-repo/'
}
}
organization {
name = 'Pusher'
url = 'http://pusher.com'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/pusher/pusher-http-java/issues'
}
developer {
id = 'pusher-team'
name = 'Pusher Engineering Team'
organization = 'Pusher'
organizationUrl = 'https://pusher.com'
}
}
}
}
repositories {
maven {
def releaseRepositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith("SNAPSHOT") ? snapshotRepositoryUrl : releaseRepositoryUrl
credentials {
username = findProperty("maven.username") ?: ""
password = findProperty("maven.password") ?: ""
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
test {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}