Skip to content

Commit

Permalink
full format
Browse files Browse the repository at this point in the history
  • Loading branch information
dries007 committed Oct 23, 2014
1 parent 41037f1 commit 4581c0c
Show file tree
Hide file tree
Showing 323 changed files with 69,463 additions and 732 deletions.
56 changes: 28 additions & 28 deletions build.gradle
@@ -1,10 +1,10 @@
buildscript {
repositories{
mavenCentral()
}
dependencies {
classpath group: "com.github.rodionmoiseev.gradle.plugins", name: "idea-utils", version: "0.2"
}
repositories {
mavenCentral()
}
dependencies {
classpath group: "com.github.rodionmoiseev.gradle.plugins", name: "idea-utils", version: "0.2"
}
}

apply plugin: "java"
Expand Down Expand Up @@ -42,16 +42,16 @@ idea {
name = "Client"
type = "Application"
mainClass = project.group + ".Main"
file ("run/").mkdir()
file("run/").mkdir()
module = project
workingDirectory = file ("run/")
workingDirectory = file("run/")
}
}
}
}

repositories {
mavenCentral()
mavenCentral()
maven {
url = "http://maven.sk89q.com/repo/"
}
Expand All @@ -65,33 +65,33 @@ dependencies {
compile group: "commons-codec", name: "commons-codec", version: "1.9"
compile group: "org.freemarker", name: "freemarker", version: "2.3.20"
compile group: "org.apache.logging.log4j", name: "log4j-core", version: "2.0.2"
compile group: "net.lingala.zip4j", name:"zip4j", version: "1.3.2"
compile group: "com.sk89q", name:"intake", version: "3.1.1-SNAPSHOT"
compile group: "net.lingala.zip4j", name: "zip4j", version: "1.3.2"
compile group: "com.sk89q", name: "intake", version: "3.1.1-SNAPSHOT"
}

processResources
{
from(sourceSets.main.resources.srcDirs)
{
include 'mcmod.info'
expand 'version':project.version, 'build':System.getenv().BUILD_NUMBER
}
}
{
from(sourceSets.main.resources.srcDirs)
{
include 'mcmod.info'
expand 'version': project.version, 'build': System.getenv().BUILD_NUMBER
}
}

jar {
from "LICENSE.txt"
from configurations.runtime.asFileTree.files.collect { zipTree(it) }

manifest {
attributes (
"Created-By" : vendor,
"Specification-Title" : project.name,
"Specification-Version" : project.version,
"Specification-Vendor" : vendor,
"Implementation-Title" : project.name,
"Implementation-Version" : project.version,
"Implementation-Vendor" : vendor,
"Main-Class" : project.group + ".Main"
attributes(
"Created-By": vendor,
"Specification-Title": project.name,
"Specification-Version": project.version,
"Specification-Vendor": vendor,
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": vendor,
"Main-Class": project.group + ".Main"
)
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/net/doubledoordev/backend/Main.java
Expand Up @@ -69,11 +69,10 @@
public class Main
{
public static final Logger LOGGER = LogManager.getLogger(Main.class.getSimpleName());
public static final String build, version;
public static String adminKey;
public static boolean running = true;

public static final String build, version;

static
{
Properties properties = new Properties();
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/net/doubledoordev/backend/server/Server.java
Expand Up @@ -1004,6 +1004,12 @@ public Map<Integer, Dimension> getDimensionMap()
return dimensionMap;
}

@Override
public String toString()
{
return getName();
}

public static class Deserializer implements JsonDeserializer<Server>
{
@Override
Expand Down Expand Up @@ -1031,10 +1037,4 @@ public JsonElement serialize(Server src, Type typeOfSrc, JsonSerializationContex
return data;
}
}

@Override
public String toString()
{
return getName();
}
}
50 changes: 24 additions & 26 deletions src/main/java/net/doubledoordev/backend/util/Cache.java
Expand Up @@ -46,10 +46,8 @@
import net.doubledoordev.backend.Main;
import net.doubledoordev.backend.server.Server;
import net.doubledoordev.backend.webserver.Webserver;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand Down Expand Up @@ -214,6 +212,30 @@ public void run()
}
}
};
/**
* Time vars
*/
public static long REALLY_LONG_CACHE_TIMEOUT = 1000 * 60 * 60 * 24; // 24 hours
public static long LONG_CACHE_TIMEOUT = 1000 * 60 * 60; // 1 hour
public static long MEDIUM_CACHE_TIMEOUT = 1000 * 60; // 1 minute
public static long SHORT_CACHE_TIMEOUT = 1000 * 10; // 20 seconds
/**
* Forge version related things
*/
private static long lastForgeVersions = 0L;
/**
* MC version related things
*/
private static long lastMCVersions = 0L;
/**
* Size counter related things
*/
private static long lastSize = 0L;
/**
*
*/
private static boolean hasUpdate = false;
private static String updatedVersion = "";
private static final Runnable UPDATE_CHECKER = new Runnable()
{
@Override
Expand Down Expand Up @@ -246,30 +268,6 @@ public void run()
}
}
};
/**
* Time vars
*/
public static long REALLY_LONG_CACHE_TIMEOUT = 1000 * 60 * 60 * 24; // 24 hours
public static long LONG_CACHE_TIMEOUT = 1000 * 60 * 60; // 1 hour
public static long MEDIUM_CACHE_TIMEOUT = 1000 * 60; // 1 minute
public static long SHORT_CACHE_TIMEOUT = 1000 * 10; // 20 seconds
/**
* Forge version related things
*/
private static long lastForgeVersions = 0L;
/**
* MC version related things
*/
private static long lastMCVersions = 0L;
/**
* Size counter related things
*/
private static long lastSize = 0L;
/**
*
*/
private static boolean hasUpdate = false;
private static String updatedVersion = "";
/**
* Timer related things
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/doubledoordev/backend/util/Constants.java
Expand Up @@ -149,9 +149,9 @@ public boolean accept(File dir, String name)
public static final Joiner JOINER_COMMA_SPACE = Joiner.on(", ");
public static final Joiner JOINER_COMMA = Joiner.on(',');
public static final Joiner JOINER_SPACE = Joiner.on(' ');
public static final String VERSION_CHECKER_URL = "http://jenkins.dries007.net/view/D3_misc/job/D3Backend/api/json?tree=lastStableBuild[number,artifacts[*]]";
public static final Pattern VERSION_PATTERN = Pattern.compile("\\d+(?:\\.\\d+)+");
protected static final char[] symbols = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
public static final String VERSION_CHECKER_URL = "http://jenkins.dries007.net/view/D3_misc/job/D3Backend/api/json?tree=lastStableBuild[number,artifacts[*]]";
public static final Pattern VERSION_PATTERN = Pattern.compile("\\d+(?:\\.\\d+)+");

/**
* Methods that only get called to init the Constants
Expand Down
2,099 changes: 2,098 additions & 1 deletion src/main/resources/static/css/font-awesome.min.css

Large diffs are not rendered by default.

0 comments on commit 4581c0c

Please sign in to comment.