From 40331a863bbd6fa8647f1759686064beb3f720d5 Mon Sep 17 00:00:00 2001 From: Zeruth Date: Tue, 23 Jul 2019 05:29:24 -0400 Subject: [PATCH] gradle: TODO: properly fix these temp fixes. --- cache/pom.xml | 13 ---------- .../net/runelite/http/api/RuneLiteAPI.java | 25 +++++++++---------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/cache/pom.xml b/cache/pom.xml index 360b86490f..5b2dbf0475 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -142,19 +142,6 @@ - - org.antlr - antlr4-maven-plugin - ${antlr4.version} - - - process-resources - - antlr4 - - - - org.apache.maven.plugins maven-jar-plugin diff --git a/http-api/src/main/java/net/runelite/http/api/RuneLiteAPI.java b/http-api/src/main/java/net/runelite/http/api/RuneLiteAPI.java index 1bca0032cb..9ef9c1fb39 100644 --- a/http-api/src/main/java/net/runelite/http/api/RuneLiteAPI.java +++ b/http-api/src/main/java/net/runelite/http/api/RuneLiteAPI.java @@ -26,6 +26,7 @@ package net.runelite.http.api; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import jdk.nashorn.internal.runtime.linker.Bootstrap; import okhttp3.HttpUrl; import okhttp3.Interceptor; import okhttp3.OkHttpClient; @@ -53,6 +54,10 @@ import java.util.concurrent.TimeUnit; public class RuneLiteAPI { + public static final String buildCommit = "6fe334c02648d3f8b38625e3175e3f547d54aa37"; + private static final String version = "1.5.30-SNAPSHOT"; + private static final int rsVersion = 181; + public static final String RUNELITE_AUTH = "RUNELITE-AUTH"; public static final OkHttpClient CLIENT; public static final OkHttpClient RLP_CLIENT; @@ -70,9 +75,6 @@ public class RuneLiteAPI private static final Properties properties = new Properties(); private static String userAgent; private static String rlpUserAgent; - private static String version; - private static String rlpVersion; - private static int rsVersion; static { @@ -82,15 +84,12 @@ public class RuneLiteAPI properties.load(in); parseMavenVersion(); - String commit = parseGithubCommit(); - - rlpVersion = properties.getProperty("runelite.version"); - rsVersion = Integer.parseInt(properties.getProperty("rs.version")); - String rlpCommit = properties.getProperty("runelite.commit"); - boolean dirty = Boolean.parseBoolean(properties.getProperty("runelite.dirty")); + String commit = buildCommit; + String rlpCommit = ""; + boolean dirty = false; userAgent = "RuneLite/" + version + "-" + commit + (dirty ? "+" : ""); - rlpUserAgent = "RuneLite/" + rlpVersion + "-" + rlpCommit + (dirty ? "+" : ""); + rlpUserAgent = "RuneLite/" + version + "-" + rlpCommit + (dirty ? "+" : ""); } catch (NumberFormatException e) { @@ -203,7 +202,7 @@ public class RuneLiteAPI public static void setVersion(String version) { - RuneLiteAPI.version = version; + //RuneLiteAPI.version = version; } public static int getRsVersion() @@ -213,7 +212,7 @@ public class RuneLiteAPI public static String getRlpVersion() { - return rlpVersion; + return version; } private static byte[] downloadUrl(URL toDownload) @@ -258,7 +257,7 @@ public class RuneLiteAPI Node node = versionList.item(i); if (node.getTextContent() != null) { - version = node.getTextContent(); + //version = node.getTextContent(); } } }