Skip to content

Commit

Permalink
Integrate supercell-api-wrapper-essentials (#60)
Browse files Browse the repository at this point in the history
* Integrate supercell-api-wrapper-essentials

* Change release version checker

---------

Co-authored-by: Michael Lieshoff <[email protected]>
  • Loading branch information
mlieshoff and Michael Lieshoff authored Dec 18, 2023
1 parent ed1fb5a commit 54537ff
Show file tree
Hide file tree
Showing 62 changed files with 165 additions and 1,135 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

## [Unreleased]

## [4.0.0] - 2023-12-18

### Added

- new dependency supercell-api-wrapper-essentials

### Changed

- classes in package brawljars.api.* moved to supercell.api.wrapper.essentials.api.*
- classes in package brawljars.connector moved to supercell.api.wrapper.essentials.connector
- classes in package brawljars.api.connector moved to supercell.api.wrapper.essentials.api.connector
- classes in package brawljars.build moved to supercell.api.wrapper.essentials.build
- classes in package brawljars.common moved to supercell.api.wrapper.essentials.common

## [3.0.8] - 2023-12-18

### Added
Expand Down Expand Up @@ -71,7 +85,8 @@

- Create release job #41

[unreleased]: https://github.com/mlieshoff/brawljars/compare/v3.0.8...HEAD
[unreleased]: https://github.com/mlieshoff/brawljars/compare/v4.0.0...HEAD
[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
[3.0.7]: https://github.com/mlieshoff/brawljars/compare/v3.0.6...v3.0.7
[3.0.6]: https://github.com/mlieshoff/brawljars/compare/v3.0.5...v3.0.6
Expand Down
40 changes: 35 additions & 5 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 3.0.8
# brawljars 4.0.0
A Java Wrapper For Official Supercell Brawl Stars Api

## Why we don't use the Swagger scheme?
Expand Down Expand Up @@ -37,9 +37,39 @@ Proxy endpoint
https://bsproxy.royaleapi.dev/v1
```

Use built-in http connector
Bind essentials to your project
```xml
<repositories>
<repository>
<id>packagecloud-supercell-api-wrapper-essentials</id>
<url>https://packagecloud.io/mlieshoff/supercell-api-wrapper-essentials/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
```

and use the dependency
```xml
<dependency>
<groupId>supercell-api-wrapper-essentials</groupId>
<artifactId>supercell-api-wrapper-essentials</artifactId>
<version>1.0.1</version>
</dependency>
```

Use built-in standard connector
```java
Connector connector = new StandardConnector();
```

or use the new filesystem cached connector
```java
Connector connector = new StandardConnector();
Connector connector = new FilesystemCachedConnector("brawljars")
```

or use custom implementation
Expand Down Expand Up @@ -268,15 +298,15 @@ All requests are returning *java.concurrent.Future*. The execution will be async

to Gradle:
```groovy
implementation group: 'brawljars', name: 'brawljars', version: '3.0.8'
implementation group: 'brawljars', name: 'brawljars', version: '4.0.0'
```

to Maven:
```xml
<dependency>
<groupId>brawljars</groupId>
<artifactId>brawljars</artifactId>
<version>3.0.8</version>
<version>4.0.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.0.8
v4.0.0
23 changes: 19 additions & 4 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>3.0.8</version>
<version>4.0.0</version>
<groupId>brawljars</groupId>
<url>https://maven.apache.org</url>
<inceptionYear>2020</inceptionYear>
Expand All @@ -12,8 +12,8 @@
<developer>
<id>michael.lieshoff (ML)</id>
<name>Michael Lieshoff</name>
<email>[email protected]</email>
<organization>mili.org</organization>
<email>[email protected]</email>
<organization>psiclops</organization>
<roles>
<role>Developer</role>
</roles>
Expand Down Expand Up @@ -135,7 +135,7 @@
<goal>java</goal>
</goals>
<configuration>
<mainClass>brawljars.build.ReleaseVersionChecker</mainClass>
<mainClass>supercell.api.wrapper.essentials.build.ReleaseVersionChecker</mainClass>
<arguments>
<argument>./VERSION.txt</argument>
<argument>./pom.xml</argument>
Expand Down Expand Up @@ -201,6 +201,11 @@
<artifactId>gson</artifactId>
<version>${version.gson}</version>
</dependency>
<dependency>
<groupId>supercell-api-wrapper-essentials</groupId>
<artifactId>supercell-api-wrapper-essentials</artifactId>
<version>1.0.1</version>
</dependency>

<!-- others -->
<dependency>
Expand Down Expand Up @@ -289,5 +294,15 @@
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>packagecloud-supercell-api-wrapper-essentials</id>
<url>https://packagecloud.io/mlieshoff/supercell-api-wrapper-essentials/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
9 changes: 5 additions & 4 deletions src/main/java/brawljars/BrawlJars.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
*/
package brawljars;

import static brawljars.common.Utils.require;
import static supercell.api.wrapper.essentials.common.Utils.require;

import static java.util.stream.Collectors.toList;

import brawljars.api.Api;
import brawljars.api.ApiContext;
import brawljars.api.intern.DefaultApiClasses;
import brawljars.connector.Connector;

import supercell.api.wrapper.essentials.api.Api;
import supercell.api.wrapper.essentials.api.ApiContext;
import supercell.api.wrapper.essentials.connector.Connector;

import java.lang.reflect.Constructor;
import java.util.HashMap;
Expand Down
19 changes: 0 additions & 19 deletions src/main/java/brawljars/api/Api.java

This file was deleted.

30 changes: 0 additions & 30 deletions src/main/java/brawljars/api/ApiContext.java

This file was deleted.

52 changes: 0 additions & 52 deletions src/main/java/brawljars/api/BaseApi.java

This file was deleted.

35 changes: 0 additions & 35 deletions src/main/java/brawljars/api/ExecutorServiceDecorator.java

This file was deleted.

3 changes: 2 additions & 1 deletion src/main/java/brawljars/api/intern/DefaultApiClasses.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package brawljars.api.intern;

import brawljars.api.Api;
import brawljars.api.intern.brawlers.BrawlerApi;
import brawljars.api.intern.clubs.ClubApi;
import brawljars.api.intern.events.EventApi;
Expand All @@ -25,6 +24,8 @@

import lombok.Getter;

import supercell.api.wrapper.essentials.api.Api;

import java.util.Map;

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brawljars.api.intern.brawlers;

import brawljars.api.Api;
import supercell.api.wrapper.essentials.api.Api;

import java.util.concurrent.Future;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package brawljars.api.intern.brawlers;

import brawljars.api.ApiContext;
import brawljars.api.BaseApi;
import supercell.api.wrapper.essentials.api.ApiContext;
import supercell.api.wrapper.essentials.api.BaseApi;

import java.util.concurrent.Future;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
*/
package brawljars.api.intern.brawlers;

import brawljars.common.Request;

import lombok.Builder;

import supercell.api.wrapper.essentials.common.Request;

import java.util.Map;

public class BrawlerRequest extends Request {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
*/
package brawljars.api.intern.brawlers;

import brawljars.common.IResponse;
import brawljars.common.RawResponse;

import com.google.gson.annotations.SerializedName;

import lombok.Data;
import lombok.EqualsAndHashCode;

import supercell.api.wrapper.essentials.common.IResponse;
import supercell.api.wrapper.essentials.common.RawResponse;

@Data
@EqualsAndHashCode(callSuper = true)
public class BrawlerResponse extends Brawler implements IResponse {
Expand Down
Loading

0 comments on commit 54537ff

Please sign in to comment.