From 4604bc8b8199290800508be2c07d1e44fb099845 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 24 Jul 2022 16:15:24 +0100 Subject: [PATCH] Add assisted injection extension --- asm/build.gradle.kts | 2 +- buffer/build.gradle.kts | 2 +- cache-550/build.gradle.kts | 2 +- cache/build.gradle.kts | 2 +- conf/build.gradle.kts | 2 +- crypto/build.gradle.kts | 2 +- decompiler/build.gradle.kts | 2 +- deob-ast/build.gradle.kts | 2 +- deob-bytecode/build.gradle.kts | 2 +- gradle/libs.versions.toml | 4 +++- http/build.gradle.kts | 2 +- inject/build.gradle.kts | 2 +- json/build.gradle.kts | 2 +- net/build.gradle.kts | 2 +- patcher/build.gradle.kts | 2 +- protocol/build.gradle.kts | 1 + yaml/build.gradle.kts | 2 +- 17 files changed, 19 insertions(+), 16 deletions(-) diff --git a/asm/build.gradle.kts b/asm/build.gradle.kts index 9cb5d642c9..4d29480eb6 100644 --- a/asm/build.gradle.kts +++ b/asm/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { api(projects.util) api(libs.bundles.asm) - api(libs.guice) + api(libs.bundles.guice) api(libs.jackson.databind) api(libs.netty.buffer) diff --git a/buffer/build.gradle.kts b/buffer/build.gradle.kts index d8b2eae10a..9ecfef2100 100644 --- a/buffer/build.gradle.kts +++ b/buffer/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - api(libs.guice) + api(libs.bundles.guice) api(libs.netty.buffer) implementation(projects.util) diff --git a/cache-550/build.gradle.kts b/cache-550/build.gradle.kts index 48f4234daa..7e9f25c477 100644 --- a/cache-550/build.gradle.kts +++ b/cache-550/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { api(projects.cache) - api(libs.guice) + api(libs.bundles.guice) implementation(projects.buffer) implementation(projects.util) diff --git a/cache/build.gradle.kts b/cache/build.gradle.kts index 4d10c98a93..3c4310e182 100644 --- a/cache/build.gradle.kts +++ b/cache/build.gradle.kts @@ -5,9 +5,9 @@ plugins { dependencies { api(projects.crypto) + api(libs.bundles.guice) api(libs.commons.compress) api(libs.fastutil) - api(libs.guice) api(libs.netty.buffer) implementation(projects.buffer) diff --git a/conf/build.gradle.kts b/conf/build.gradle.kts index 73201fd408..93c9373779 100644 --- a/conf/build.gradle.kts +++ b/conf/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { api(projects.crypto) - api(libs.guice) + api(libs.bundles.guice) implementation(projects.yaml) } diff --git a/crypto/build.gradle.kts b/crypto/build.gradle.kts index c23f285f8e..c1dcdc5ff7 100644 --- a/crypto/build.gradle.kts +++ b/crypto/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { api(libs.bundles.bouncyCastle) - api(libs.guice) + api(libs.bundles.guice) api(libs.jackson.databind) api(libs.netty.buffer) diff --git a/decompiler/build.gradle.kts b/decompiler/build.gradle.kts index 55d66c0f77..684d62fcfb 100644 --- a/decompiler/build.gradle.kts +++ b/decompiler/build.gradle.kts @@ -11,8 +11,8 @@ application { dependencies { api(projects.deobUtil) + api(libs.bundles.guice) api(libs.clikt) - api(libs.guice) implementation(projects.log) implementation(projects.util) diff --git a/deob-ast/build.gradle.kts b/deob-ast/build.gradle.kts index 902ec4d5bb..d53b69510d 100644 --- a/deob-ast/build.gradle.kts +++ b/deob-ast/build.gradle.kts @@ -10,8 +10,8 @@ application { dependencies { api(projects.deobUtil) + api(libs.bundles.guice) api(libs.clikt) - api(libs.guice) implementation(projects.inject) implementation(projects.log) diff --git a/deob-bytecode/build.gradle.kts b/deob-bytecode/build.gradle.kts index 9ce27715cc..c9309d6ed7 100644 --- a/deob-bytecode/build.gradle.kts +++ b/deob-bytecode/build.gradle.kts @@ -9,8 +9,8 @@ application { } dependencies { + api(libs.bundles.guice) api(libs.clikt) - api(libs.guice) implementation(projects.deobAnnotations) implementation(projects.deobUtil) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3cfe9a4c27..3b63725350 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,8 @@ fastutil = { module = "it.unimi.dsi:fastutil", version = "8.5.8" } fernflower = { module = "org.openrs2:fernflower", version = "1.1.1" } flyway = { module = "org.flywaydb:flyway-core", version = "9.0.1" } guava = { module = "com.google.guava:guava", version.ref = "guava" } -guice = { module = "com.google.inject:guice", version.ref = "guice" } +guice-core = { module = "com.google.inject:guice", version.ref = "guice" } +guice-assistedInject = { module = "com.google.inject.extensions:guice-assistedinject", version.ref = "guice" } h2 = { module = "com.h2database:h2", version = "2.1.214" } hikaricp = { module = "com.zaxxer:HikariCP", version = "5.0.1" } inlineLogger = { module = "com.michael-bull.kotlin-inline-logger:kotlin-inline-logger", version = "1.0.4" } @@ -84,6 +85,7 @@ xz = { module = "org.tukaani:xz", version = "1.9" } [bundles] asm = ["asm-core", "asm-commons", "asm-tree", "asm-util"] bouncyCastle = ["bouncyCastle-pkix", "bouncyCastle-provider"] +guice = ["guice-core", "guice-assistedInject"] ktor = [ "ktor-serialization-jackson", "ktor-server-auto-head-response", diff --git a/http/build.gradle.kts b/http/build.gradle.kts index b47a5de108..ec13f2e6af 100644 --- a/http/build.gradle.kts +++ b/http/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - api(libs.guice) + api(libs.bundles.guice) implementation(libs.guava) implementation(libs.kotlin.coroutines.core) diff --git a/inject/build.gradle.kts b/inject/build.gradle.kts index 3d5bc99216..cab4ebe81e 100644 --- a/inject/build.gradle.kts +++ b/inject/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - api(libs.guice) + api(libs.bundles.guice) } publishing { diff --git a/json/build.gradle.kts b/json/build.gradle.kts index 22b74e7a0a..fde0a65990 100644 --- a/json/build.gradle.kts +++ b/json/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - api(libs.guice) + api(libs.bundles.guice) api(libs.jackson.databind) implementation(libs.jackson.kotlin) diff --git a/net/build.gradle.kts b/net/build.gradle.kts index f3025da20d..92e493620e 100644 --- a/net/build.gradle.kts +++ b/net/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - api(libs.guice) + api(libs.bundles.guice) api(libs.kotlin.coroutines.core) api(libs.netty.transport) diff --git a/patcher/build.gradle.kts b/patcher/build.gradle.kts index bda4cfa096..5a7d95409b 100644 --- a/patcher/build.gradle.kts +++ b/patcher/build.gradle.kts @@ -10,8 +10,8 @@ application { dependencies { api(projects.asm) + api(libs.bundles.guice) api(libs.clikt) - api(libs.guice) implementation(projects.conf) implementation(projects.inject) diff --git a/protocol/build.gradle.kts b/protocol/build.gradle.kts index 8da1693d38..04c81b01f4 100644 --- a/protocol/build.gradle.kts +++ b/protocol/build.gradle.kts @@ -5,6 +5,7 @@ plugins { dependencies { api(projects.crypto) + api(libs.bundles.guice) api(libs.netty.codec.core) implementation(projects.buffer) diff --git a/yaml/build.gradle.kts b/yaml/build.gradle.kts index 6ecca63130..77fedf321b 100644 --- a/yaml/build.gradle.kts +++ b/yaml/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - api(libs.guice) + api(libs.bundles.guice) api(libs.jackson.databind) implementation(libs.jackson.kotlin)