Skip to content

Commit

Permalink
Fixed some compiling bugs
Browse files Browse the repository at this point in the history
+ Updated spigot dependencies
+ Created new 1.16.4 branch
+ Fixed some compiling bugs
+ Fixed JSON manager for API requests.

Auto-Tune will still work on 1.14 - 1.16
  • Loading branch information
noahbclarkson committed Nov 8, 2020
1 parent 44332fc commit d7747f2
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 9 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ name: Java CI with Maven

on:
push:
branches: [ 1.16.3 ]
branches: [ 1.16.4 ]
pull_request:
branches: [ 1.16.3 ]
branches: [ 1.16.4 ]

jobs:
build:
build-java-8:

runs-on: ubuntu-latest

Expand All @@ -22,3 +22,27 @@ jobs:
java-version: 1.8
- name: Build with Maven
run: mvn -B clean test package -U --file ./Auto-Tune/pom.xml
build-java-11:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn -B clean test package -U --file ./Auto-Tune/pom.xml
build-java-15:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 15
- name: Build with Maven
run: mvn -B clean test package -U --file ./Auto-Tune/pom.xml
15 changes: 14 additions & 1 deletion Auto-Tune/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
<configuration>
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -90,7 +97,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.2-R0.1-SNAPSHOT</version>
<version>1.16.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -123,6 +130,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down
13 changes: 10 additions & 3 deletions Auto-Tune/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.2-R0.1-SNAPSHOT</version>
<version>1.16.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -71,8 +71,8 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
<scope>compile</scope>
<version>1.18.16</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
Expand Down Expand Up @@ -117,6 +117,13 @@
<configuration>
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.16</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static Double sendPostRequestUsingHttpClient(String model, String algorit
Double newPrice = price;
CloseableHttpClient client = HttpClients.createDefault();
HttpPost httpPost = new HttpPost("https://safe-refuge-09383.herokuapp.com");
JSONObject json = JsonManager.returnJSONFromParams(model, algorithm, price, averageBuy, averageSell,
JSONObject json = JSONManager.returnJSONFromParams(model, algorithm, price, averageBuy, averageSell,
maxVolatility, minVolatility);
Main.debugLog("Sending data to API for " + item + ": - " + "model: " + model + ", price: " + price
+ ", averageBuy: " + averageBuy + ", averageSell: " + averageSell + ", maxVolatility: " + maxVolatility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.json.simple.JSONObject;

public class JsonManager {
public class JSONManager {

public static JSONObject returnJSONFromParams(String model, String algorithm, Double price, Double averageBuy, Double averageSell, Double maxVolatility, Double minVolatility){
JSONObject obj = new JSONObject();
Expand Down

0 comments on commit d7747f2

Please sign in to comment.