diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml
index ed3d8aa..3b12af0 100644
--- a/.github/workflows/merge.yml
+++ b/.github/workflows/merge.yml
@@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: zulu
- java-version: 17
+ java-version: 21
server-id: packagecloud
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml
index 28fe348..40ff0d6 100644
--- a/.github/workflows/nightlies.yml
+++ b/.github/workflows/nightlies.yml
@@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: zulu
- java-version: 17
+ java-version: 21
- name: Start E2E tests
run: mvn -B verify -PendToEnd
env:
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index 1d99e49..41b1b20 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -9,7 +9,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: zulu
- java-version: 17
+ java-version: 21
- name: Build with Maven
run:
mvn -B package
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a492825..68906df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,27 @@
## [Unreleased]
-## [4.0.1] - 2024-05-15
+## [4.0.2] - 2024-05-08
+
+### Changed
+
+- test scope: isNotBlank() and EMPTY not depending on wiremock anymore
+- test scope: clean up integration test base & tests
+- Source code is now ready for Java 21 (#67)
+- Binary code is now Java 21 compliant (#67)
+- Apache Commons IO from 2.15.1 to 2.16.1
+- JaCoCo from 0.8.11 to 0.8.12
+- JUnit from 5.10.1 to 5.10.2
+- Lombok from 1.8.30 to 1.8.32
+- Maven Compiler Plugin from 3.11.0 to 3.13.0
+- Maven Exec Plugin from 3.1.1 to 3.2.0
+- Maven Source Plugin from 3.3.0 to 3.3.1
+- Maven Surfire Plugin from 3.2.3 to 3.2.5
+- Mockito from 5.8.0 to 5.11.0
+- SLF4j from 2.0.12 to 2.0.13
+- WireMock from 3.0.1 to 3.5.4
+
+## [4.0.1] - 2024-02-15
### Fixed
@@ -91,7 +111,8 @@
- Create release job #41
-[unreleased]: https://github.com/mlieshoff/brawljars/compare/v4.0.1...HEAD
+[unreleased]: https://github.com/mlieshoff/brawljars/compare/v4.0.2...HEAD
+[4.0.2]: https://github.com/mlieshoff/brawljars/compare/v4.0.1...v4.0.2
[4.0.1]: https://github.com/mlieshoff/brawljars/compare/v4.0.0...v4.0.1
[4.0.0]: https://github.com/mlieshoff/brawljars/compare/v3.0.8...v4.0.0
[3.0.8]: https://github.com/mlieshoff/brawljars/compare/v3.0.7...v3.0.8
diff --git a/README.md b/README.md
index 42ad01e..dd5bbfc 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
[![](https://img.shields.io/badge/java-packagecloud.io-844fec.svg)](https://packagecloud.io/)
[![Nightlies](https://github.com/mlieshoff/brawljars/actions/workflows/nightlies.yml/badge.svg)](https://github.com/mlieshoff/brawljars/actions/workflows/nightlies.yml)
-# brawljars 4.0.1
+# brawljars 4.0.2
A Java Wrapper For Official Supercell Brawl Stars Api
## Why we don't use the Swagger scheme?
@@ -298,7 +298,7 @@ All requests are returning *java.concurrent.Future*. The execution will be async
to Gradle:
```groovy
- implementation group: 'brawljars', name: 'brawljars', version: '4.0.1'
+ implementation group: 'brawljars', name: 'brawljars', version: '4.0.2'
```
to Maven:
@@ -306,7 +306,7 @@ to Maven:
brawljars
brawljars
- 4.0.1
+ 4.0.2
```
@@ -336,6 +336,23 @@ Then initialize an instance of class Api like that:
That's all, enjoy :)
+## Library updates
+
+Minor versions
+```
+mvn versions:update-parent versions:use-latest-releases versions:update-properties versions:commit -DallowMajorUpdates=false
+```
+
+Major versions
+```
+mvn versions:update-parent versions:use-latest-releases versions:update-properties versions:commit -DallowMajorUpdates=true
+```
+
+Update plugins
+```
+mvn versions:display-plugin-updates -U
+```
+
## Contributing
-1. Set up the formatting hook, via copying the files under ./brawljars/hooks to ./brawljars/.git/hooks
\ No newline at end of file
+1. Feel free to open Pull Requests with your ideas :)
\ No newline at end of file
diff --git a/VERSION.txt b/VERSION.txt
index 85937e4..752d86b 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-v4.0.1
\ No newline at end of file
+v4.0.2
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index fb95414..be185a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
brawljars
jar
- 4.0.1
+ 4.0.2
brawljars
https://maven.apache.org
2020
@@ -32,23 +32,24 @@
2.10.1
- 2.15.1
- 0.8.11
- 17
+ 2.16.1
+ 0.8.12
+ 21
1.1.4
- 5.10.1
- 1.18.30
- 3.11.0
+ 5.10.2
+ 1.18.32
+ 3.13.0
3.6.1
3.4.1
- 3.1.1
- 3.3.0
- 3.2.3
+ 3.2.0
+ 3.3.1
+ 3.2.5
1.0.3
0.0.4
- 5.8.0
- 3.0.1
- 2.0.9
+ 5.11.0
+ 3.5.4
+ 2.0.13
+ 1.0.1
@@ -192,7 +193,7 @@
supercell-api-wrapper-essentials
supercell-api-wrapper-essentials
- 1.0.1
+ ${version.supercell.api.wrapper.essentials}
@@ -235,8 +236,8 @@
test
- com.github.tomakehurst
- wiremock-standalone
+ org.wiremock
+ wiremock
${version.wiremock}
test
diff --git a/src/test/java/brawljars/EndToEnd.java b/src/test/java/brawljars/EndToEnd.java
index f564af8..eb633a7 100644
--- a/src/test/java/brawljars/EndToEnd.java
+++ b/src/test/java/brawljars/EndToEnd.java
@@ -16,9 +16,11 @@
*/
package brawljars;
+import static brawljars.IntegrationTestBase.EMPTY;
+
import static org.junit.jupiter.api.Assertions.assertEquals;
-import static wiremock.org.apache.commons.lang3.StringUtils.EMPTY;
+import static java.lang.System.lineSeparator;
import brawljars.api.intern.brawlers.BrawlerApi;
import brawljars.api.intern.brawlers.BrawlerRequest;
@@ -108,12 +110,7 @@ private static void assertDiff(String expected, String actual) {
diff = Json.createDiff(source.asJsonArray(), target.asJsonArray());
}
StringBuilder diffOutput = new StringBuilder();
- diff.toJsonArray()
- .forEach(
- entry ->
- diffOutput
- .append(entry)
- .append(System.getProperty("line.separator")));
+ diff.toJsonArray().forEach(entry -> diffOutput.append(entry).append(lineSeparator()));
assertEquals(EMPTY, diffOutput.toString());
}
diff --git a/src/test/java/brawljars/IntegrationTestBase.java b/src/test/java/brawljars/IntegrationTestBase.java
index ec2979b..61e2903 100644
--- a/src/test/java/brawljars/IntegrationTestBase.java
+++ b/src/test/java/brawljars/IntegrationTestBase.java
@@ -24,16 +24,15 @@
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static org.apache.commons.io.FileUtils.readLines;
+import static org.apache.hc.core5.http.HttpHeaders.AUTHORIZATION;
+import static org.apache.hc.core5.http.HttpStatus.SC_BAD_REQUEST;
+import static org.apache.hc.core5.http.HttpStatus.SC_OK;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;
-import static wiremock.org.apache.commons.lang3.StringUtils.EMPTY;
-import static wiremock.org.apache.commons.lang3.StringUtils.isNotBlank;
-import static wiremock.org.apache.hc.core5.http.HttpHeaders.AUTHORIZATION;
-import static wiremock.org.apache.hc.core5.http.HttpStatus.SC_BAD_REQUEST;
-import static wiremock.org.apache.hc.core5.http.HttpStatus.SC_OK;
+import static supercell.api.wrapper.essentials.common.Utils.isNotBlank;
import static java.util.Collections.emptyMap;
@@ -62,6 +61,8 @@ public abstract class IntegrationTestBase {
private static final Gson GSON =
new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
+ public static final String EMPTY = "";
+
private static final ThreadLocal expected = new ThreadLocal<>();
private static WireMockServer wireMockServer;
diff --git a/src/test/java/brawljars/api/intern/brawlers/BrawlerApiImplIntegrationTest.java b/src/test/java/brawljars/api/intern/brawlers/BrawlerApiImplIntegrationTest.java
index 592f826..d7b1813 100644
--- a/src/test/java/brawljars/api/intern/brawlers/BrawlerApiImplIntegrationTest.java
+++ b/src/test/java/brawljars/api/intern/brawlers/BrawlerApiImplIntegrationTest.java
@@ -16,8 +16,6 @@
*/
package brawljars.api.intern.brawlers;
-import static wiremock.org.apache.commons.lang3.StringUtils.EMPTY;
-
import brawljars.IntegrationTestBase;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/brawljars/api/intern/clubs/ClubApiImplIntegrationTest.java b/src/test/java/brawljars/api/intern/clubs/ClubApiImplIntegrationTest.java
index 2b13b0a..4dde75c 100644
--- a/src/test/java/brawljars/api/intern/clubs/ClubApiImplIntegrationTest.java
+++ b/src/test/java/brawljars/api/intern/clubs/ClubApiImplIntegrationTest.java
@@ -16,8 +16,6 @@
*/
package brawljars.api.intern.clubs;
-import static wiremock.org.apache.commons.lang3.StringUtils.EMPTY;
-
import brawljars.IntegrationTestBase;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/brawljars/api/intern/events/EventApiImplIntegrationTest.java b/src/test/java/brawljars/api/intern/events/EventApiImplIntegrationTest.java
index 0134f33..352b0ff 100644
--- a/src/test/java/brawljars/api/intern/events/EventApiImplIntegrationTest.java
+++ b/src/test/java/brawljars/api/intern/events/EventApiImplIntegrationTest.java
@@ -16,8 +16,6 @@
*/
package brawljars.api.intern.events;
-import static wiremock.org.apache.commons.lang3.StringUtils.EMPTY;
-
import brawljars.IntegrationTestBase;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/brawljars/api/intern/players/PlayerApiImplIntegrationTest.java b/src/test/java/brawljars/api/intern/players/PlayerApiImplIntegrationTest.java
index fa403f7..606f25b 100644
--- a/src/test/java/brawljars/api/intern/players/PlayerApiImplIntegrationTest.java
+++ b/src/test/java/brawljars/api/intern/players/PlayerApiImplIntegrationTest.java
@@ -16,8 +16,6 @@
*/
package brawljars.api.intern.players;
-import static wiremock.org.apache.commons.lang3.StringUtils.EMPTY;
-
import brawljars.IntegrationTestBase;
import org.junit.jupiter.api.BeforeEach;
diff --git a/src/test/java/brawljars/api/intern/rankings/RankingApiImplIntegrationTest.java b/src/test/java/brawljars/api/intern/rankings/RankingApiImplIntegrationTest.java
index 5e94186..5ece129 100644
--- a/src/test/java/brawljars/api/intern/rankings/RankingApiImplIntegrationTest.java
+++ b/src/test/java/brawljars/api/intern/rankings/RankingApiImplIntegrationTest.java
@@ -16,8 +16,6 @@
*/
package brawljars.api.intern.rankings;
-import static wiremock.org.apache.commons.lang3.StringUtils.EMPTY;
-
import brawljars.IntegrationTestBase;
import org.junit.jupiter.api.BeforeEach;