Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove shaded Netty in favor of Minecraft's #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "io.pyke.vitri"
version = "1.0.0"
version = "1.0.1-SNAPSHOT"
description = "A Minecraft mod for simulating autonomous agents."

repositories {
Expand All @@ -19,9 +19,13 @@ repositories {
}

val includeImplementation by configurations.registering
val includeRuntimeOnly by configurations.registering

configurations {
implementation.get().extendsFrom(includeImplementation.get())
include.get().extendsFrom(includeImplementation.get())
runtimeOnly.get().extendsFrom(includeRuntimeOnly.get())

include.get().extendsFrom(includeImplementation.get(), includeRuntimeOnly.get())
}

dependencies {
Expand All @@ -43,6 +47,9 @@ dependencies {
modImplementation(libs.fabric.api)
modImplementation(libs.modmenu)

// gRPC's Netty and Guava are not included, since Minecraft has them out of the box
// they are older than the dependency expects, but ABI should be ok for what we need

compileOnly(libs.tomcat.annotations)
includeImplementation(libs.grpc.api)
includeImplementation(libs.grpc.core)
Expand All @@ -51,8 +58,9 @@ dependencies {
includeImplementation(libs.grpc.services)
includeImplementation(libs.grpc.protobuf)
includeImplementation(libs.grpc.protobuf.lite)
includeImplementation(libs.grpc.netty.shaded)
includeImplementation(libs.grpc.netty)
includeImplementation(libs.protobuf.java)
includeRuntimeOnly(libs.perfmark.api)
}

loom {
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ grpc-stub = { group = "io.grpc", name = "grpc-stub", version.ref = "grpc" }
grpc-services = { group = "io.grpc", name = "grpc-services", version.ref = "grpc" }
grpc-protobuf = { group = "io.grpc", name = "grpc-protobuf", version.ref = "grpc" }
grpc-protobuf-lite = { group = "io.grpc", name = "grpc-protobuf-lite", version.ref = "grpc" }
grpc-netty-shaded = { group = "io.grpc", name = "grpc-netty-shaded", version.ref = "grpc" }
grpc-netty = { group = "io.grpc", name = "grpc-netty", version.ref = "grpc" }
tomcat-annotations = { group = "org.apache.tomcat", name = "annotations-api", version = "6.0.53" }
protobuf-java = { group = "com.google.protobuf", name = "protobuf-java", version.ref = "protobuf" }
perfmark-api = { group = "io.perfmark", name = "perfmark-api", version = "0.27.0" }
# other mods
modmenu = { group = "com.terraformersmc", name = "modmenu", version = "1.16.23" }

Expand Down