Skip to content

Commit 1caf8e5

Browse files
Library and test update (#138)
* Update latest release date * Update for the new release (#128) * Update latest release date * Fix version code * Update developer setup documentation, improve code checkstyle rules when compiling * Update library versions * Formated code in test, testing wiremock library for creating paths with "/" * Update retrofit version, add RunAllTests class for running tests synchronously * Update wiremock rules and testing methods, fix test errors * Update library versions and checkstyle rule * Update code and checkstyle rule * Fix test using atomic integer instead of boolean * Improve gradle semantics for adding dependencies, add developer document building instructions * Format developer document * Update retrofit version * Update subscription manager test timeout to 4 seconds * Bump version
1 parent f0030c4 commit 1caf8e5

313 files changed

Lines changed: 2775 additions & 2645 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.pubnub.yml‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
name: java
2-
version: 4.20.0
2+
version: 4.22.0-beta
33
schema: 1
44
scm: github.com/pubnub/java
55
files:
6-
- build/libs/pubnub-gson-4.21.0-all.jar
6+
- build/libs/pubnub-gson-4.22.0-beta-all.jar
77
changelog:
8+
- version: v4.22.0-beta
9+
date: 2018-01-31
10+
changes:
11+
- type: feature
12+
text: Update 3rd party libraries
813
- version: v4.21.0
914
date: 2018-10-26
1015
changes:
@@ -326,7 +331,7 @@ changelog:
326331
features:
327332
access:
328333
- ACCESS-GRANT
329-
- ACCESS-SECRET-KEY-ALL-ACCESS
334+
- ACCESS-SECRET-KEY-ALL-ACCESS
330335
channel-groups:
331336
- CHANNEL-GROUPS-ADD-CHANNELS
332337
- CHANNEL-GROUPS-REMOVE-CHANNELS
@@ -352,7 +357,7 @@ features:
352357
- PUBLISH-GET
353358
- PUBLISH-POST
354359
- PUBLISH-ASYNC
355-
- PUBLISH-FIRE
360+
- PUBLISH-FIRE
356361
- PUBLISH-REPLICATION-FLAG
357362
- PUBLISH-MESSAGE-TTL
358363
storage:
@@ -374,8 +379,7 @@ features:
374379
- SUBSCRIBE-FILTER-EXPRESSION
375380
- SUBSCRIBE-PUBLISHER-UUID
376381
supported-platforms:
377-
-
378-
version: PubNub Java SDK
382+
- version: PubNub Java SDK
379383
platforms:
380384
- Windows 10 (7u85 and above)
381385
- Windows 8.x (Desktop)
@@ -394,7 +398,6 @@ supported-platforms:
394398
- Ubuntu Linux 10.04 and above
395399
editors:
396400
- Java7+
397-
-
398-
version: PubNub Android SDK
401+
- version: PubNub Android SDK
399402
platforms:
400403
- Android 2.3.1+

‎DEVELOPER.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
`gradle clean compile`
1515

1616
### Building a shadowJar (Fat Jar)
17-
`gradle clean build shadowJar`
17+
* `gradle clean build shadowJar`
18+
##### or
19+
* `gradle clean`
20+
* `gradle clean test`
21+
* `gradle build shadowJar`
1822

1923
### deploying to nexus
2024
* enable the javadoc documentation

‎build.gradle‎

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
plugins {
2-
id "io.franzbecker.gradle-lombok" version "1.8"
3-
id 'com.github.johnrengelman.shadow' version '1.2.4'
4-
id "com.bmuschko.nexus" version "2.3.1"
5-
id 'com.github.ben-manes.versions' version '0.15.0'
2+
id 'io.franzbecker.gradle-lombok' version '1.14'
3+
id 'com.github.johnrengelman.shadow' version '4.0.2'
4+
id 'com.bmuschko.nexus' version '2.3.1'
5+
id 'com.github.ben-manes.versions' version '0.20.0'
66
id 'java'
77
id 'jacoco'
88
id 'maven'
99
id 'checkstyle'
1010
id 'findbugs'
1111
}
1212
group = 'com.pubnub'
13-
version = '4.21.0'
13+
version = '4.22.0-beta'
1414

1515
description = """"""
1616

17-
sourceCompatibility = 1.7
18-
targetCompatibility = 1.7
17+
sourceCompatibility = 1.8
18+
targetCompatibility = 1.8
1919

2020
configurations.all {
2121
}
2222

2323
lombok {
24-
version = "1.16.18"
24+
version = "1.18.4"
2525
}
2626

2727
repositories {
@@ -30,36 +30,31 @@ repositories {
3030

3131

3232
dependencies {
33-
compile(group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.3.0') {
34-
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
35-
}
36-
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.9.1'
37-
38-
compile group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.9.1'
33+
implementation group: 'com.squareup.retrofit2', name: 'retrofit', version: '2.5.0'
34+
implementation group: 'com.squareup.okhttp3', name: 'logging-interceptor', version: '3.12.1'
3935

40-
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.22'
36+
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
4137

4238
// jackson
4339
// compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version:'2.7.3'
4440
// compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version:'2.7.3'
4541
// compile group: 'com.squareup.retrofit2', name: 'converter-jackson', version:'2.1.0'
4642

4743
// gson
48-
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
49-
compile group: 'com.squareup.retrofit2', name: 'converter-gson', version:'2.3.0'
50-
//
44+
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
45+
implementation group: 'com.squareup.retrofit2', name: 'converter-gson', version: '2.4.0'
5146

52-
testCompile group: 'ch.qos.logback', name: 'logback-classic', version:'1.1.8'
53-
testCompile group: 'ch.qos.logback', name: 'logback-core', version:'1.1.8'
54-
testCompile group: 'junit', name: 'junit', version:'4.12'
55-
testCompile group: 'com.github.tomakehurst', name: 'wiremock', version:'1.58'
56-
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version:'1.3'
57-
testCompile group: 'com.jayway.awaitility', name: 'awaitility', version:'1.7.0'
58-
testCompile group: 'org.json', name: 'json', version: '20160810'
47+
testImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
48+
testImplementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'
49+
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
50+
testImplementation group: 'junit', name: 'junit', version: '4.12'
51+
testImplementation group: 'com.github.tomakehurst', name: 'wiremock', version: '2.19.0'
52+
testImplementation group: 'org.awaitility', name: 'awaitility', version: '3.1.2'
53+
testImplementation group: 'org.json', name: 'json', version: '20180813'
5954
}
6055

6156
jacoco {
62-
toolVersion = "0.7.6.201602180812"
57+
toolVersion = "0.8.2"
6358
}
6459

6560
jacocoTestReport {
@@ -70,22 +65,21 @@ jacocoTestReport {
7065
}
7166

7267
checkstyle {
73-
configFile = new File(rootDir, "src/test/checkstyle.xml")
74-
toolVersion = '6.19'
68+
toolVersion = "8.14"
69+
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
70+
//configFile = new File(rootDir, "config/checkstyle/checkstyle.xml")
7571
}
7672

7773
tasks.withType(Checkstyle) {
78-
79-
exclude '**/vendor/**', "**/*Test*"
74+
exclude '**/vendor/**', '**/*Test*'
8075

8176
reports {
82-
xml.enabled = true
77+
xml.enabled = true
8378
html.enabled = true
8479
}
8580
}
8681

8782
tasks.withType(FindBugs) {
88-
8983
exclude '**/vendor/**'
9084

9185
reports {
@@ -160,12 +154,11 @@ javadoc {
160154
destinationDir = file("docs")
161155

162156
options.noTimestamp = true
163-
164157
}
165158

166159
task sourcesJar(type: Jar, dependsOn: classes) {
167160
classifier = 'sources'
168-
from "$buildDir/delombok";
161+
from "$buildDir/delombok"
169162
}
170163

171164
build.finalizedBy(shadowJar)
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@
5858

5959
<!-- Checks for Size Violations. -->
6060
<!-- See http://checkstyle.sf.net/config_sizes.html -->
61-
<module name="FileLength"/>
61+
<module name="FileLength">
62+
<property name="max" value="3000" />
63+
<property name="severity" value="warning" />
64+
</module>
6265

6366
<!-- Checks for whitespace -->
6467
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
@@ -80,16 +83,15 @@
8083
<!-- <property name="fileExtensions" value="java"/> -->
8184
<!-- </module> -->
8285

83-
84-
<!-- <module name="SuppressionCommentFilter"/> -->
85-
<module name="SuppressionCommentFilter">
86-
<property name="offCommentFormat" value="CHECKSTYLE_OFF: ALMOST_ALL"/>
87-
<property name="onCommentFormat" value="CHECKSTYLE_ON: ALMOST_ALL"/>
88-
<property name="checkFormat" value="^((?!(EqualsHashCode)).)*$"/>
89-
</module>
90-
9186
<module name="TreeWalker">
9287

88+
<!-- <module name="SuppressionCommentFilter"/> -->
89+
<module name="SuppressionCommentFilter">
90+
<property name="offCommentFormat" value="CHECKSTYLE_OFF: ALMOST_ALL"/>
91+
<property name="onCommentFormat" value="CHECKSTYLE_ON: ALMOST_ALL"/>
92+
<property name="checkFormat" value="^((?!(EqualsHashCode)).)*$"/>
93+
</module>
94+
9395
<!-- Checks for Javadoc comments. -->
9496
<!-- See http://checkstyle.sf.net/config_javadoc.html
9597
<module name="JavadocMethod"/>
@@ -112,7 +114,7 @@
112114

113115
<!-- Checks for imports -->
114116
<!-- See http://checkstyle.sf.net/config_import.html -->
115-
<module name="AvoidStarImport"/>
117+
<!--<module name="AvoidStarImport"/>-->
116118
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
117119
<module name="RedundantImport"/>
118120
<module name="UnusedImports">

‎docs/allclasses-frame.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html lang="en">
44
<head>
55
<!-- Generated by javadoc -->
6-
<title>All Classes (pubnub-gson 4.18.0 API)</title>
6+
<title>All Classes (pubnub-gson 4.22.0-beta API)</title>
77
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
88
<script type="text/javascript" src="script.js"></script>
99
</head>

‎docs/allclasses-noframe.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html lang="en">
44
<head>
55
<!-- Generated by javadoc -->
6-
<title>All Classes (pubnub-gson 4.18.0 API)</title>
6+
<title>All Classes (pubnub-gson 4.22.0-beta API)</title>
77
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
88
<script type="text/javascript" src="script.js"></script>
99
</head>

0 commit comments

Comments
 (0)