summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-01-20 19:29:50 +0500
committerilotterytea <iltsu@alright.party>2025-01-20 19:29:50 +0500
commit043834fa0adf502f61ba09fe312fa3e90b8a6bcc (patch)
tree6b140cc4fdb73c954d564b2baf6ff1086a4ada76 /server
initial commit
Diffstat (limited to 'server')
-rw-r--r--server/build.gradle41
-rw-r--r--server/src/main/java/kz/ilotterytea/frogartha/server/ServerLauncher.java8
2 files changed, 49 insertions, 0 deletions
diff --git a/server/build.gradle b/server/build.gradle
new file mode 100644
index 0000000..1aaf851
--- /dev/null
+++ b/server/build.gradle
@@ -0,0 +1,41 @@
+apply plugin: 'application'
+
+
+java.sourceCompatibility = 11
+java.targetCompatibility = 11
+if (JavaVersion.current().isJava9Compatible()) {
+ compileJava.options.release.set(11)
+}
+
+mainClassName = 'kz.ilotterytea.frogartha.server.ServerLauncher'
+application.setMainClass(mainClassName)
+eclipse.project.name = appName + '-server'
+
+dependencies {
+ implementation project(':shared')
+}
+
+jar {
+ archiveBaseName.set(appName)
+// the duplicatesStrategy matters starting in Gradle 7.0; this setting works.
+ duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
+ dependsOn configurations.runtimeClasspath
+ from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
+// these "exclude" lines remove some unnecessary duplicate files in the output JAR.
+ exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA')
+ dependencies {
+ exclude('META-INF/INDEX.LIST', 'META-INF/maven/**')
+ }
+// setting the manifest makes the JAR runnable.
+ manifest {
+ attributes 'Main-Class': project.mainClassName
+ }
+// this last step may help on some OSes that need extra instruction to make runnable JARs.
+ doLast {
+ file(archiveFile).setExecutable(true, false)
+ }
+}
+
+// Equivalent to the jar task; here for compatibility with gdx-setup.
+task dist(dependsOn: [jar]) {
+}
diff --git a/server/src/main/java/kz/ilotterytea/frogartha/server/ServerLauncher.java b/server/src/main/java/kz/ilotterytea/frogartha/server/ServerLauncher.java
new file mode 100644
index 0000000..fc7c1e5
--- /dev/null
+++ b/server/src/main/java/kz/ilotterytea/frogartha/server/ServerLauncher.java
@@ -0,0 +1,8 @@
+package kz.ilotterytea.frogartha.server;
+
+/** Launches the server application. */
+public class ServerLauncher {
+ public static void main(String[] args) {
+ // TODO Implement server application.
+ }
+} \ No newline at end of file