From bc97d286b279f91b2a948d9cdd19af083f732afc Mon Sep 17 00:00:00 2001 From: Heinrich Vogel Date: Tue, 17 Dec 2024 17:45:12 +0100 Subject: [PATCH 1/5] Update async-http-client to 3.0.1 and remove deprecated GitHub Pages plugin --- build.gradle | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index e07cd70..550cc87 100644 --- a/build.gradle +++ b/build.gradle @@ -4,16 +4,12 @@ buildscript { repositories { mavenCentral() } - dependencies { - classpath 'org.ajoberstar:gradle-git:1.1.0' - } } plugins { id 'java-library' id 'maven-publish' id "signing" - id "org.ajoberstar.github-pages" version "1.7.2" } def getProperty = { property -> @@ -44,7 +40,7 @@ ext.sharedManifest = manifest { dependencies { implementation 'org.apache.httpcomponents:httpclient:4.5.13' - implementation 'org.asynchttpclient:async-http-client:2.12.3' + 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' @@ -93,18 +89,6 @@ java { withJavadocJar() } -githubPages { - repoUri = 'https://github.com/pusher/pusher-http-java.git' - pages { - from javadoc.outputs.files - } - commitMessage = "JavaDoc gh-pages for ${version}" - credentials { - username = { getProperty("github.username") } - password = { getProperty("github.password") } - } -} - publishing { publications { mavenJava(MavenPublication) { From 010dbbb7da49a8843b11a05ace5856a5c705bbbd Mon Sep 17 00:00:00 2001 From: Heinrich Vogel Date: Tue, 17 Dec 2024 18:15:16 +0100 Subject: [PATCH 2/5] Update CI matrix to remove Java 8 and add Java 21 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33985bd..39106b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - java-version: [8, 11, 17] + java-version: [11, 17, 21] steps: - uses: actions/checkout@v2 From 44f85320aa1fb53442aa8c6d9a1bfcc29d164d77 Mon Sep 17 00:00:00 2001 From: Heinrich Vogel Date: Wed, 18 Dec 2024 10:41:12 +0100 Subject: [PATCH 3/5] Update Gradle wrapper to 8.11.1 and remove deprecated JavaPluginConvention references --- build.gradle | 45 +++++++----------------- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/build.gradle b/build.gradle index 550cc87..baddba4 100644 --- a/build.gradle +++ b/build.gradle @@ -26,16 +26,12 @@ repositories { group = "com.pusher" version = "1.3.3" description = "Pusher HTTP Client" -sourceCompatibility = "1.8" -targetCompatibility = "1.8" -ext.sharedManifest = manifest { - attributes( - 'Created-By': 'Pusher', - 'Implementation-Vendor': 'Pusher', - 'Implementation-Title': 'Pusher HTTP Java', - 'Implementation-Version': version - ) +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + withSourcesJar() + withJavadocJar() } dependencies { @@ -62,33 +58,16 @@ javadoc { jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE - manifest = project.manifest { - from sharedManifest + manifest { + attributes( + 'Created-By': 'Pusher', + 'Implementation-Vendor': 'Pusher', + 'Implementation-Title': 'Pusher HTTP Java', + 'Implementation-Version': version + ) } } -task sourcesJar(type: Jar, dependsOn: classes) { - archiveClassifier.set('sources') - from sourceSets.main.allSource -} -assemble.dependsOn sourcesJar - - -task javadocJar(type: Jar, dependsOn: javadoc) { - archiveClassifier.set('javadoc') - from javadoc.destinationDir -} -assemble.dependsOn javadocJar - -artifacts { - archives jar, sourcesJar, javadocJar -} - -java { - withSourcesJar() - withJavadocJar() -} - publishing { publications { mavenJava(MavenPublication) { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ae04661..81aa1c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From a312832462aba301802bf586a2c0fa38139722b1 Mon Sep 17 00:00:00 2001 From: Heinrich Vogel Date: Wed, 18 Dec 2024 10:42:25 +0100 Subject: [PATCH 4/5] Refactor SignatureUtil to use Long.toString() instead of deprecated Long constructor --- src/main/java/com/pusher/rest/SignatureUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/pusher/rest/SignatureUtil.java b/src/main/java/com/pusher/rest/SignatureUtil.java index 3a044b6..4a28081 100644 --- a/src/main/java/com/pusher/rest/SignatureUtil.java +++ b/src/main/java/com/pusher/rest/SignatureUtil.java @@ -36,7 +36,7 @@ public static URI uri(final String method, final Map allParams = new HashMap(extraParams); allParams.put("auth_key", key); allParams.put("auth_version", "1.0"); - allParams.put("auth_timestamp", new Long(System.currentTimeMillis() / 1000).toString()); + allParams.put("auth_timestamp", Long.toString(System.currentTimeMillis() / 1000)); if (body != null) { allParams.put("body_md5", bodyMd5(body)); } From 90dc3446a0e006264a0a27034663ca5fb3875798 Mon Sep 17 00:00:00 2001 From: Pusher CI Date: Wed, 18 Dec 2024 15:13:35 +0000 Subject: [PATCH 5/5] Bump to version 1.3.4 --- CHANGELOG.md | 7 +++++++ README.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e56879e..9f903f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 1.3.4 + +- [CHANGED] Updated org.asynchttpclient:async-http-client to 3.0.1 to address a vulnerability +- [CHANGED] Updated CI matrix to remove Java 8 and add Java 21, reflecting current support policy +- [CHANGED] Replaced deprecated constructor with in +- [REMOVED] Deprecated org.ajoberstar.github-pages plugin and associated configuration + ## 1.3.1 2022-05-16 - [CHANGED] Use SecureRandom.nextBytes instead of SecureRandom.generateSeed diff --git a/README.md b/README.md index 6669877..1f348e1 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The pusher-http-java library is available in Maven Central: com.pusher pusher-http-java - 1.3.3 + 1.3.4 ```