gradle: TODO: properly fix these temp fixes.
This commit is contained in:
13
cache/pom.xml
vendored
13
cache/pom.xml
vendored
@@ -142,19 +142,6 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.antlr</groupId>
|
|
||||||
<artifactId>antlr4-maven-plugin</artifactId>
|
|
||||||
<version>${antlr4.version}</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>process-resources</id>
|
|
||||||
<goals>
|
|
||||||
<goal>antlr4</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ package net.runelite.http.api;
|
|||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
|
import jdk.nashorn.internal.runtime.linker.Bootstrap;
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
import okhttp3.Interceptor;
|
import okhttp3.Interceptor;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
@@ -53,6 +54,10 @@ import java.util.concurrent.TimeUnit;
|
|||||||
|
|
||||||
public class RuneLiteAPI
|
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 String RUNELITE_AUTH = "RUNELITE-AUTH";
|
||||||
public static final OkHttpClient CLIENT;
|
public static final OkHttpClient CLIENT;
|
||||||
public static final OkHttpClient RLP_CLIENT;
|
public static final OkHttpClient RLP_CLIENT;
|
||||||
@@ -70,9 +75,6 @@ public class RuneLiteAPI
|
|||||||
private static final Properties properties = new Properties();
|
private static final Properties properties = new Properties();
|
||||||
private static String userAgent;
|
private static String userAgent;
|
||||||
private static String rlpUserAgent;
|
private static String rlpUserAgent;
|
||||||
private static String version;
|
|
||||||
private static String rlpVersion;
|
|
||||||
private static int rsVersion;
|
|
||||||
|
|
||||||
static
|
static
|
||||||
{
|
{
|
||||||
@@ -82,15 +84,12 @@ public class RuneLiteAPI
|
|||||||
properties.load(in);
|
properties.load(in);
|
||||||
|
|
||||||
parseMavenVersion();
|
parseMavenVersion();
|
||||||
String commit = parseGithubCommit();
|
String commit = buildCommit;
|
||||||
|
String rlpCommit = "";
|
||||||
rlpVersion = properties.getProperty("runelite.version");
|
boolean dirty = false;
|
||||||
rsVersion = Integer.parseInt(properties.getProperty("rs.version"));
|
|
||||||
String rlpCommit = properties.getProperty("runelite.commit");
|
|
||||||
boolean dirty = Boolean.parseBoolean(properties.getProperty("runelite.dirty"));
|
|
||||||
|
|
||||||
userAgent = "RuneLite/" + version + "-" + commit + (dirty ? "+" : "");
|
userAgent = "RuneLite/" + version + "-" + commit + (dirty ? "+" : "");
|
||||||
rlpUserAgent = "RuneLite/" + rlpVersion + "-" + rlpCommit + (dirty ? "+" : "");
|
rlpUserAgent = "RuneLite/" + version + "-" + rlpCommit + (dirty ? "+" : "");
|
||||||
}
|
}
|
||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
@@ -203,7 +202,7 @@ public class RuneLiteAPI
|
|||||||
|
|
||||||
public static void setVersion(String version)
|
public static void setVersion(String version)
|
||||||
{
|
{
|
||||||
RuneLiteAPI.version = version;
|
//RuneLiteAPI.version = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getRsVersion()
|
public static int getRsVersion()
|
||||||
@@ -213,7 +212,7 @@ public class RuneLiteAPI
|
|||||||
|
|
||||||
public static String getRlpVersion()
|
public static String getRlpVersion()
|
||||||
{
|
{
|
||||||
return rlpVersion;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static byte[] downloadUrl(URL toDownload)
|
private static byte[] downloadUrl(URL toDownload)
|
||||||
@@ -258,7 +257,7 @@ public class RuneLiteAPI
|
|||||||
Node node = versionList.item(i);
|
Node node = versionList.item(i);
|
||||||
if (node.getTextContent() != null)
|
if (node.getTextContent() != null)
|
||||||
{
|
{
|
||||||
version = node.getTextContent();
|
//version = node.getTextContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user