Skip to content

Commit 3b750e6

Browse files
committed
Prepare release
1 parent 0cd8804 commit 3b750e6

File tree

5 files changed

+52
-52
lines changed

5 files changed

+52
-52
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# 4.0.0
22

3-
* Support [aes128gcm content encoding](https://tools.ietf.org/html/draft-ietf-httpbis-encryption-encoding-09#section-2)
3+
* Support [aes128gcm content encoding](https://tools.ietf.org/html/draft-ietf-httpbis-encryption-encoding-09#section-2) (#72)
44
* Use `PushService.send(Notification, Encoding)` or the analogous `sendAsync` with `Encoding.AES128GCM`.
5+
* Remove Guava dependency (#69)
56

RELEASE.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
```
1212
git commit -m "Release NEW_VERSION"
13-
git tag -a NEW_VERSION
13+
git tag -a NEW_VERSION -m "Version NEW_VERSION"
1414
```
1515

1616
3. [Deploy to OSSRH with Gradle](http://central.sonatype.org/pages/gradle.html):
1717

1818
```
19-
./gradlew -Prelease uploadArchives
19+
./gradlew -Prelease clean publish
2020
```
2121

2222
4. [Releasing the Deployment](http://central.sonatype.org/pages/releasing-the-deployment.html):
@@ -25,11 +25,10 @@ git tag -a NEW_VERSION
2525
./gradlew -Prelease closeAndReleaseRepository
2626
```
2727

28-
5. Increment to next version with -SNAPSHOT suffix
28+
5. Increment to next version and add a -SNAPSHOT suffix
2929

3030
```
3131
./scripts/version.sh OLD_VERSION NEW_VERSION-SNAPSHOT
32-
...
3332
```
3433

3534
6. Create a commit for the new version "Set version to a.b.c-SNAPSHOT"

build.gradle

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ plugins {
33
id 'com.github.johnrengelman.shadow' version '4.0.2'
44

55
// Used by release.gradle
6-
id 'maven'
6+
id 'maven-publish'
77
id 'signing'
88
id 'io.codearte.nexus-staging' version '0.12.0'
99
}
1010

11-
if (hasProperty('release')) {
12-
apply from: 'release.gradle'
13-
}
14-
1511
apply plugin: 'application'
1612
apply plugin: 'com.github.johnrengelman.shadow'
1713

@@ -103,5 +99,10 @@ task sourcesJar(type: Jar) {
10399
}
104100

105101
artifacts {
106-
archives javadocJar, sourcesJar
102+
archives javadocJar
103+
archives sourcesJar
104+
}
105+
106+
if (hasProperty('release')) {
107+
apply from: 'release.gradle'
107108
}

release.gradle

+40-41
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,54 @@
1-
signing {
2-
sign configurations.archives
3-
}
4-
5-
uploadArchives {
6-
repositories {
7-
mavenDeployer {
8-
beforeDeployment { MavenDeployment deployment ->
9-
signing.signPom(deployment)
10-
}
11-
12-
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
13-
authentication(
14-
userName: ossrhUsername,
15-
password: ossrhPassword
16-
)
17-
}
18-
19-
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
20-
authentication(
21-
userName: ossrhUsername,
22-
password: ossrhPassword
23-
)
24-
}
25-
26-
pom.project {
27-
name 'web-push'
28-
packaging 'jar'
29-
description 'A Web Push library for Java.'
30-
url 'https://github.com/web-push-libs/webpush-java'
31-
1+
publishing {
2+
publications {
3+
mavenJava(MavenPublication) {
4+
from components.java
5+
artifact sourcesJar
6+
artifact javadocJar
7+
pom {
8+
name = 'web-push'
9+
description = 'A Web Push library for Java.'
10+
url = 'https://github.com/web-push-libs/webpush-java'
3211
scm {
33-
connection 'scm:git:[email protected]:web-push-libs/webpush-java.git'
34-
developerConnection 'scm:git:[email protected]:web-push-libs/webpush-java.git'
35-
url '[email protected]:web-push-libs/webpush-java.git'
12+
connection = 'scm:git:[email protected]:web-push-libs/webpush-java.git'
13+
developerConnection = 'scm:git:[email protected]:web-push-libs/webpush-java.git'
14+
url = '[email protected]:web-push-libs/webpush-java.git'
3615
}
37-
3816
licenses {
3917
license {
40-
name 'MIT License'
41-
url 'https://opensource.org/licenses/MIT'
18+
name = 'MIT License'
19+
url = 'https://opensource.org/licenses/MIT'
4220
}
4321
}
44-
4522
developers {
4623
developer {
47-
id 'martijndwars'
48-
name 'Martijn Dwars'
49-
24+
id = 'martijndwars'
25+
name = 'Martijn Dwars'
26+
5027
}
5128
}
5229
}
30+
31+
}
32+
}
33+
repositories {
34+
maven {
35+
credentials {
36+
username ossrhUsername
37+
password ossrhPassword
38+
}
39+
url getRepositoryUrl()
5340
}
5441
}
5542
}
43+
44+
signing {
45+
sign publishing.publications.mavenJava
46+
}
47+
48+
def getRepositoryUrl() {
49+
if (version.endsWith('SNAPSHOT')) {
50+
return 'https://oss.sonatype.org/content/repositories/snapshots/'
51+
} else {
52+
return 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
53+
}
54+
}

scripts/version.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)