-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Main.kt into its own server module
Update logback
- Loading branch information
Showing
15 changed files
with
133 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,6 @@ exclude: | |
- tools | ||
- types | ||
- yaml | ||
- server | ||
projectJDK: 19 | ||
linter: jetbrains/qodana-jvm-community:2023.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | ||
|
||
plugins { | ||
application | ||
id("com.github.johnrengelman.shadow") | ||
} | ||
|
||
dependencies { | ||
implementation(project(":cache")) | ||
implementation(project(":engine")) | ||
implementation(project(":network")) | ||
api(project(":game")) | ||
implementation(project(":yaml")) | ||
implementation(project(":types")) | ||
|
||
implementation(kotlin("script-runtime")) | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${findProperty("kotlinCoroutinesVersion")}") | ||
implementation("org.rsmod:rsmod-pathfinder:${findProperty("pathfinderVersion")}") | ||
|
||
implementation("io.insert-koin:koin-core:${findProperty("koinVersion")}") | ||
implementation("io.insert-koin:koin-logger-slf4j:${findProperty("koinLogVersion")}") | ||
implementation("ch.qos.logback:logback-classic:${findProperty("logbackVersion")}") | ||
implementation("com.michael-bull.kotlin-inline-logger:kotlin-inline-logger-jvm:${findProperty("inlineLoggingVersion")}") | ||
|
||
} | ||
|
||
application { | ||
mainClass.set("world.gregs.voidps.Main") | ||
} | ||
|
||
tasks { | ||
named<ShadowJar>("shadowJar") { | ||
minimize { | ||
exclude(dependency("org.jetbrains.kotlin:kotlin-script-runtime:.*")) | ||
exclude(dependency("org.postgresql:postgresql:.*")) | ||
exclude(dependency("org.jetbrains.exposed:exposed-jdbc:.*")) | ||
exclude(dependency("ch.qos.logback:logback-classic:.*")) | ||
} | ||
archiveBaseName.set("void-server-${version}") | ||
archiveClassifier.set("") | ||
archiveVersion.set("") | ||
} | ||
} | ||
|
||
distributions { | ||
create("bundle") { | ||
distributionBaseName = "void" | ||
contents { | ||
from(tasks["shadowJar"]) | ||
from("../data/definitions/") { | ||
into("data/definitions") | ||
} | ||
from("../data/map") { | ||
into("data/map") | ||
} | ||
from("../data/spawns") { | ||
into("data/spawns") | ||
} | ||
val emptyDirs = listOf("cache", "saves") | ||
for (dir in emptyDirs) { | ||
val file = layout.buildDirectory.get().dir("tmp/empty/$dir/").asFile | ||
file.mkdirs() | ||
} | ||
from(layout.buildDirectory.dir("tmp/empty/")) { | ||
into("data") | ||
} | ||
val resourcesDir = layout.projectDirectory.dir("src/main/resources") | ||
from(resourcesDir.file("game.properties")) | ||
val bat = resourcesDir.file("run-server.bat").asFile | ||
bat.writeText(bat.readText().replace("-dev.jar", "-${version}.jar")) | ||
from(bat) | ||
val shell = resourcesDir.file("run-server.sh").asFile | ||
shell.writeText(shell.readText().replace("-dev.jar", "-${version}.jar")) | ||
from(shell) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<configuration> | ||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>[%logger{0}] - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
<root level="trace"> | ||
<appender-ref ref="console"/> | ||
</root> | ||
<logger name="com.zaxxer.hikari.pool" level="WARN"/> | ||
<logger name="com.zaxxer.hikari.HikariConfig" level="WARN"/> | ||
<logger name="Exposed" level="WARN"> | ||
</logger> | ||
</configuration> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ include("buffer") | |
include("network") | ||
include("types") | ||
include("yaml") | ||
include("server") |