Signed-off-by: Graham <gpe@openrs2.dev>
@ -8,7 +8,7 @@ fun main(args: Array<String>) = BundleCommand().main(args)
class BundleCommand : CliktCommand(name = "bundle") {
override fun run() {
val injector = Guice.createInjector(BundlerModule())
val injector = Guice.createInjector(BundlerModule)
val bundler = injector.getInstance(Bundler::class.java)
bundler.run(Paths.get("nonfree/lib"), Paths.get("nonfree/var/cache/bundle"), Paths.get("etc/loader.p12"))
}
@ -3,8 +3,8 @@ package dev.openrs2.bundler
import com.google.inject.AbstractModule
import dev.openrs2.crypto.CryptoModule
class BundlerModule : AbstractModule() {
object BundlerModule : AbstractModule() {
override fun configure() {
install(CryptoModule())
install(CryptoModule)
@ -4,9 +4,9 @@ import com.google.inject.AbstractModule
import com.google.inject.Scopes
import dev.openrs2.yaml.YamlModule
class ConfigModule : AbstractModule() {
object ConfigModule : AbstractModule() {
install(YamlModule())
install(YamlModule)
bind(Config::class.java)
.toProvider(ConfigProvider::class.java)
@ -4,7 +4,7 @@ import com.google.inject.AbstractModule
import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters
class CryptoModule : AbstractModule() {
object CryptoModule : AbstractModule() {
bind(RSAPrivateCrtKeyParameters::class.java)
.toProvider(RsaKeyProvider::class.java)
@ -46,7 +46,7 @@ class NameMapProcessor : AbstractProcessor() {
private lateinit var localScanner: LocalVariableScanner
init {
val injector = Guice.createInjector(YamlModule())
val injector = Guice.createInjector(YamlModule)
mapper = injector.getInstance(ObjectMapper::class.java)
@ -7,7 +7,7 @@ fun main(args: Array<String>) = GameCommand().main(args)
class GameCommand : CliktCommand(name = "game") {
val injector = Guice.createInjector(GameModule())
val injector = Guice.createInjector(GameModule)
val server = injector.getInstance(GameServer::class.java)
server.run()
@ -2,7 +2,7 @@ package dev.openrs2.game
class GameModule : AbstractModule() {
object GameModule : AbstractModule() {
// empty
@ -6,7 +6,7 @@ import com.google.inject.AbstractModule
import com.google.inject.multibindings.Multibinder
class YamlModule : AbstractModule() {
object YamlModule : AbstractModule() {
Multibinder.newSetBinder(binder(), Module::class.java)