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 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 ``` diff --git a/build.gradle b/build.gradle index e07cd70..baddba4 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 -> @@ -30,21 +26,17 @@ 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 { 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' @@ -66,42 +58,13 @@ javadoc { jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE - manifest = project.manifest { - from sharedManifest - } -} - -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() -} - -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") } + manifest { + attributes( + 'Created-By': 'Pusher', + 'Implementation-Vendor': 'Pusher', + 'Implementation-Title': 'Pusher HTTP Java', + 'Implementation-Version': version + ) } } 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 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)); }