Skip to content

Commit

Permalink
Merge pull request #3 from alyssaruth/gradle-server
Browse files Browse the repository at this point in the history
Gradle - server
  • Loading branch information
alyssaruth authored Nov 15, 2023
2 parents 3618b64 + 3f2db28 commit 7955ce3
Show file tree
Hide file tree
Showing 46 changed files with 32 additions and 116 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ jobs:
run: ./gradlew :core:build
- name: Build Client
run: ./gradlew :client:build
- name: Build Server
run: ./gradlew :server:build
21 changes: 10 additions & 11 deletions client/src/main/java/online/util/AccountUtil.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package online.util;

import javax.mail.internet.InternetAddress;

import util.DialogUtil;
import util.EncryptionUtil;

Expand All @@ -23,15 +21,16 @@ public static boolean validateEmail(String email)
return false;
}

try
{
InternetAddress.parse(email, true);
}
catch (Throwable t)
{
DialogUtil.showError("The email address you have entered is not valid.");
return false;
}
// try
// {
// InternetAddress.parse(email, true);
// }
// catch (Throwable t)
// {
// Debug.stackTraceSilently(t);
// DialogUtil.showError("The email address you have entered is not valid.");
// return false;
// }

return true;
}
Expand Down
94 changes: 0 additions & 94 deletions client/src/main/java/screen/DebugConsoleAdv.java

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions core/src/main/java/util/MessageUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

public class MessageUtil implements OnlineConstants
{
public static final String LIVE_IP = "54.149.26.201"; //Live
public static final String LAPTOP_IP = "82.3.206.177"; //Laptop (in Leeds)
// public static final String LIVE_IP = "54.149.26.201"; //Live
// public static final String LAPTOP_IP = "82.3.206.177"; //Laptop (in Leeds)
public static final String LOCAL_IP = "localhost";

public static final String SERVER_IP = LIVE_IP;
public static final String SERVER_IP = LOCAL_IP;

private static final Random RAND = new Random();

Expand Down
1 change: 0 additions & 1 deletion core/src/main/java/util/OnlineConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public interface OnlineConstants

//Used in the AboutDialog and for sending logs
public static final String ENTROPY_VERSION_NUMBER = "v7.0.0";
public static final String DARTS_VERSION_NUMBER = "v2.4.0";

//Filenames - for automatic updates
public static final String FILE_NAME_DARTS = "Dartzee.jar";
Expand Down
14 changes: 14 additions & 0 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id("Entropy.kotlin-common-conventions")
application
}

dependencies {
implementation("javax.mail:javax.mail-api:1.6.2")
implementation(project(":core"))
}

application {
// Define the main class for the application.
mainClass.set("server.EntropyServer")
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ public EntropyServer()

public static void main(String args[])
{
//Need to initialise the xml-security library so we can use Base64 encoding and decoding
com.sun.org.apache.xml.internal.security.Init.init();

EntropyServer server = new EntropyServer();
Thread.setDefaultUncaughtExceptionHandler(new DebugUncaughtExceptionHandler());

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ else if (emailExists(email))
String body = "Hi " + username + "! This is a quick test message to check that the email you entered is valid.";
body += "\nIf you forget your password, the 'Reset Password' option will generate a new one";
body += " and send it to this address. \n\nEnjoy the game!";
EntropyEmailUtil.sendEmailNoReply(title, body, email);
// EntropyEmailUtil.sendEmailNoReply(title, body, email);
emailData.put(username, email);
}
catch (Throwable t)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public class MainUtil
public static void initialise()
{
Debug.initialise(new DebugConsole());
Debug.setVersionNumber(OnlineConstants.VERSION_NUMBER);
EncryptionUtil.setBase64Interface(new Base64Desktop());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

public class PasswordServerUtil
{
private static String passwordCharacters = "abcdefghijklmnopqrstuvwxyz0123456789$%!\"&*()£#@[]?";
private static String passwordCharacters = "abcdefghijklmnopqrstuvwxyz0123456789$%!\"&*()#@[]?";

public static String generateRandomPassword()
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
*/

rootProject.name = "Entropy"
include("core", "client")
include("core", "client", "server")

0 comments on commit 7955ce3

Please sign in to comment.