chore: remove .env file

This commit is contained in:
Fiereu authored and GitHub committed 2026-06-08 15:42:23 +02:00
1 parent cc9b2beaf8
commit 1510413a16
10 files changed
+84 -73

No files matched your search

+2 -32
View File
@@ -1,33 +1,3 @@
allprojects {
beforeEvaluate {
loadEnvFile("${rootDir.absolutePath}/.env")
}
plugins {
alias(libs.plugins.dotenv)
}
fun loadEnvFile(fileName: String) {
val file = rootProject.file(fileName)
if (file.exists()) {
file.forEachLine { line ->
if (line.isNotBlank() && !line.startsWith("#")) {
val parts = line.split("=", limit = 2)
if (parts.size == 2) {
System.setProperty(parts[0].trim(), parts[1].trim())
} else {
throw IllegalArgumentException("Invalid line in env file: $line")
}
}
}
} else {
throw IllegalArgumentException("Env file '$fileName' does not exist.")
}
}
tasks.register("runAll") {
group = "application"
description = "Runs all servers and the patcher"
listOf(
":server.login:run",
":server.game:run",
":patcher:run"
).forEach { dependsOn(it) }
}