forked from web-push-libs/webpush-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
167 lines (135 loc) · 4.22 KB
/
build.gradle
File metadata and controls
167 lines (135 loc) · 4.22 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4'
classpath 'io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.8.0'
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '2.0.0'
}
group 'nl.martijndwars'
version '3.0.0'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'org.junit.platform.gradle.plugin'
apply plugin: 'io.codearte.nexus-staging'
task wrapper(type: Wrapper) {
gradleVersion = '3.0'
}
compileJava {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
compileTestJava {
sourceCompatibility = 1.8
}
jar {
baseName = 'web-push'
version = '3.0.0'
}
shadowJar {
// BouncyCastle JAR is signed; it cannot be extracted and merged into the fat JAR.
dependencies {
exclude(
dependency(group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.54')
)
}
manifest {
attributes 'Main-Class': 'nl.martijndwars.webpush.cli.Cli',
'Class-Path': '../../lib/bcprov-jdk15on-154.jar'
}
}
junitPlatform {
selectors {
aClass 'nl.martijndwars.webpush.selenium.SeleniumTests'
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(
userName: hasProperty('ossrhPassword') ? ossrhUsername : '',
password: hasProperty('ossrhPassword') ? ossrhPassword : ''
)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(
userName: hasProperty('ossrhPassword') ? ossrhUsername : '',
password: hasProperty('ossrhPassword') ? ossrhPassword : ''
)
}
pom.project {
name 'web-push'
packaging 'jar'
description 'A Web Push library for Java.'
url 'https://github.com/web-push-libs/webpush-java'
scm {
connection 'scm:git:git@github.com:web-push-libs/webpush-java.git'
developerConnection 'scm:git:git@github.com:web-push-libs/webpush-java.git'
url 'git@github.com:web-push-libs/webpush-java.git'
}
licenses {
license {
name 'MIT License'
url 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id 'martijndwars'
name 'Martijn Dwars'
email 'ikben@martijndwars.nl'
}
}
}
}
}
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
// For CLI
compile group: 'com.beust', name: 'jcommander', version: '1.69'
// For parsing JSON
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
// For making async HTTP requests
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.3'
// Not sure what for..
compile group: 'com.google.guava', name: 'guava', version: '19.0'
// For cryptographic operations
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.54'
// For creating and signing JWT
compile group: 'org.bitbucket.b_c', name: 'jose4j', version: '0.5.2'
// For making HTTP requests
testCompile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.2'
// For testing, obviously
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.0.0-M4'
// For running JUnit tests
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.0.0-M4'
// For turning InputStream to String
testCompile group: 'commons-io', name: 'commons-io', version: '2.5'
// For reading the demo vapid keypair from a pem file
testCompile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.55'
}