Skip to content

Commit

Permalink
Update libraries and Java version (#67)
Browse files Browse the repository at this point in the history
* Update libraries and Java version

* Correct changelog

* Correct actions for Java version

---------

Co-authored-by: Michael Lieshoff <[email protected]>
  • Loading branch information
mlieshoff and Michael Lieshoff authored May 8, 2024
1 parent d311cb8 commit 7026bfa
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightlies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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?
Expand Down Expand Up @@ -298,15 +298,15 @@ 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:
```xml
<dependency>
<groupId>brawljars</groupId>
<artifactId>brawljars</artifactId>
<version>4.0.1</version>
<version>4.0.2</version>
</dependency>
```

Expand Down Expand Up @@ -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
1. Feel free to open Pull Requests with your ideas :)
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.0.1
v4.0.2
33 changes: 17 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>brawljars</artifactId>
<packaging>jar</packaging>
<version>4.0.1</version>
<version>4.0.2</version>
<groupId>brawljars</groupId>
<url>https://maven.apache.org</url>
<inceptionYear>2020</inceptionYear>
Expand Down Expand Up @@ -32,23 +32,24 @@
</licenses>
<properties>
<version.gson>2.10.1</version.gson>
<version.io>2.15.1</version.io>
<version.jacoco>0.8.11</version.jacoco>
<version.java>17</version.java>
<version.io>2.16.1</version.io>
<version.jacoco>0.8.12</version.jacoco>
<version.java>21</version.java>
<version.json>1.1.4</version.json>
<version.junit>5.10.1</version.junit>
<version.lombok>1.18.30</version.lombok>
<version.maven.compiler>3.11.0</version.maven.compiler>
<version.junit>5.10.2</version.junit>
<version.lombok>1.18.32</version.lombok>
<version.maven.compiler>3.13.0</version.maven.compiler>
<version.maven.dependency>3.6.1</version.maven.dependency>
<version.maven.enforcer>3.4.1</version.maven.enforcer>
<version.maven.exec>3.1.1</version.maven.exec>
<version.maven.source>3.3.0</version.maven.source>
<version.maven.surfire>3.2.3</version.maven.surfire>
<version.maven.exec>3.2.0</version.maven.exec>
<version.maven.source>3.3.1</version.maven.source>
<version.maven.surfire>3.2.5</version.maven.surfire>
<version.maven.surfire.junit>1.0.3</version.maven.surfire.junit>
<version.maven.packagecloud>0.0.4</version.maven.packagecloud>
<version.mockito>5.8.0</version.mockito>
<version.wiremock>3.0.1</version.wiremock>
<version.slf4j>2.0.9</version.slf4j>
<version.mockito>5.11.0</version.mockito>
<version.wiremock>3.5.4</version.wiremock>
<version.slf4j>2.0.13</version.slf4j>
<version.supercell.api.wrapper.essentials>1.0.1</version.supercell.api.wrapper.essentials>
</properties>
<build>
<plugins>
Expand Down Expand Up @@ -192,7 +193,7 @@
<dependency>
<groupId>supercell-api-wrapper-essentials</groupId>
<artifactId>supercell-api-wrapper-essentials</artifactId>
<version>1.0.1</version>
<version>${version.supercell.api.wrapper.essentials}</version>
</dependency>

<!-- others -->
Expand Down Expand Up @@ -235,8 +236,8 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>${version.wiremock}</version>
<scope>test</scope>
</dependency>
Expand Down
11 changes: 4 additions & 7 deletions src/test/java/brawljars/EndToEnd.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}

Expand Down
11 changes: 6 additions & 5 deletions src/test/java/brawljars/IntegrationTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<String> expected = new ThreadLocal<>();

private static WireMockServer wireMockServer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7026bfa

Please sign in to comment.