Skip to content

Commit

Permalink
Get transport-raknet as transitive from protocol
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Castle <[email protected]>
  • Loading branch information
Kas-tle committed Apr 6, 2024
1 parent c80bd62 commit 3b79121
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 38 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"[java]": {
"editor.defaultFormatter": "redhat.java"
},
"extensions.ignoreRecommendations": false
"extensions.ignoreRecommendations": false,
"java.gradle.buildServer.enabled": "off",
"java.configuration.updateBuildConfiguration": "interactive"
}
36 changes: 1 addition & 35 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ repositories {
}

dependencies {
constraints {
implementation(libs.raknet)
}
compileOnly(libs.lombok)
annotationProcessor(libs.lombok)
compileOnly(libs.jsr305)
implementation(libs.raknet) {}
implementation(libs.bedrock.codec)
implementation(libs.bedrock.common)
implementation(libs.bedrock.connection) { exclude(group = "org.cloudburstmc.netty", module = "netty-transport-raknet") }
implementation(libs.bedrock.connection)
implementation(libs.jackson.databind)
implementation(libs.jackson.dataformat.yaml)
implementation(libs.common)
Expand Down Expand Up @@ -65,34 +61,4 @@ listOf("distZip", "distTar", "startScripts").forEach { taskName ->

tasks.named("startShadowScripts") {
dependsOn("jar")
}

eclipse {
classpath {
file {
withXml {
val classpath = asNode()
val compositeBuildModuleNames = mutableSetOf<String>()
configurations["runtimeClasspath"].resolvedConfiguration.resolvedArtifacts.forEach { artifact ->
val id = artifact.id.componentIdentifier
if (id is ProjectComponentIdentifier && !id.build.isCurrentBuild) {
val classpathEntry = classpath.appendNode("classpathentry")
classpathEntry.attributes().put("kind", "lib")
classpathEntry.attributes().put("path", artifact.file.absolutePath)
compositeBuildModuleNames.add(artifact.moduleVersion.id.name)
}
}
classpath.children().listIterator().apply {
while (hasNext()) {
val entry = next() as Node
val kind = entry.attribute("kind") as? String
val path = entry.attribute("path") as? String
if (kind == "src" && path != null && compositeBuildModuleNames.any { path.endsWith(it) }) {
remove()
}
}
}
}
}
}
}
1 change: 0 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jline-reader = { group = "org.jline", name = "jline-reader", version = "3.24.1"
jsr305 = { group = "com.google.code.findbugs", name = "jsr305", version = "3.0.2" }
minecraftauth = { group = "net.raphimc", name = "MinecraftAuth", version = "2.1.6" }
lombok = { group = "org.projectlombok", name = "lombok", version = "1.18.30" }
raknet = { group = "org.cloudburstmc.netty", name = "transport-raknet", version = "1.0.0.CR2-COMPOSITE" }

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
2 changes: 1 addition & 1 deletion protocol

0 comments on commit 3b79121

Please sign in to comment.