Files
OpenMMO/build.gradle.kts
T
fiereu a9bb88b246 dev_minimal_login (#7)
### Summary

Implement minimal login flow without any authentication.
Implement basic game server module with JoingGamePacket implemented.

### Type of Change

New feature (non-breaking change which adds functionality)

### Affected Modules

- [x] common/
- [ ] protocol/
- [ ] protocol.tls/
- [x] protocol.login/
- [ ] server/
- [x] server.login/
- [ ] keys/
- [ ] patcher/
- [ ] buildSrc/

### Additional Notes

_No response_

Reviewed-on: https://forge.fiereu.de/OpenMMO/OpenMMO/pulls/7
Co-authored-by: fiereu <contact@fiereu.de>
Co-committed-by: fiereu <contact@fiereu.de>
2025-08-29 12:54:24 +00:00

33 lines
842 B
Kotlin

allprojects {
beforeEvaluate {
loadEnvFile("${rootDir.absolutePath}/gradle.env")
}
}
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) }
}