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

Add lin-bus dependency #2004

Closed
wants to merge 1 commit 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: 7 additions & 7 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ plugins {
}

repositories {
mavenCentral()
gradlePluginPortal()
maven {
name = "EngineHub"
url = uri("https://maven.enginehub.org/repo/")
}
maven {
name = "PaperMC"
url = uri("https://repo.papermc.io/repository/maven-public/")
url = uri("https://papermc.io/repo/repository/maven-public/")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed back? On 20.05.2022 PaperMC announced the change to the new URLs. After the announcement, the URL got changed here by a pull request coming from me (#1756)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that info. I wasn't aware. Those changes came from upstream. I'll revert them.

content {
includeGroupByRegex("io\\.papermc\\..*")
}
}
mavenCentral()
gradlePluginPortal()
maven {
name = "EngineHub Repository"
url = uri("https://maven.enginehub.org/repo/")
}
}

val properties = Properties().also { props ->
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/CommonConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ fun Project.applyCommonConfiguration() {
maven {
name = "OSS Sonatype Snapshots"
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
mavenContent {
snapshotsOnly()
}
}
maven {
name = "Athion"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/CommonJavaConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, banSlf4j: Boolean

// Java 8 turns on doclint which we fail
tasks.withType<Javadoc>().configureEach {
options.encoding = "UTF-8"
(options as StandardJavadocDocletOptions).apply {
addStringOption("Xdoclint:none", "-quiet")
tags(
"apiNote:a:API Note:",
"implSpec:a:Implementation Requirements:",
"implNote:a:Implementation Note:"
)
options.encoding = "UTF-8"
links(
"https://jd.adventure.kyori.net/api/latest/",
"https://logging.apache.org/log4j/2.x/log4j-api/apidocs/",
Expand Down
12 changes: 11 additions & 1 deletion buildSrc/src/main/kotlin/LibsConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,27 @@ fun Project.applyLibrariesConfiguration() {
val relocations = mapOf(
"net.kyori.text" to "com.sk89q.worldedit.util.formatting.text",
"net.kyori.minecraft" to "com.sk89q.worldedit.util.kyori",
"net.kyori.adventure.nbt" to "com.sk89q.worldedit.util.nbt"

)

tasks.register<ShadowJar>("jar") {
configurations = listOf(project.configurations["shade"])
archiveClassifier.set("")

// Yeet module-info's
exclude("module-info.class")

dependencies {
exclude(dependency("com.google.guava:guava"))
exclude(dependency("com.google.code.gson:gson"))
exclude(dependency("com.google.errorprone:error_prone_annotations"))
exclude(dependency("org.checkerframework:checker-qual"))
exclude(dependency("org.jetbrains:annotations"))
exclude(dependency("org.apache.logging.log4j:log4j-api"))
exclude(dependency("com.google.code.findbugs:jsr305"))
exclude {
it.moduleGroup == "org.jetbrains.kotlin"
}
}

relocations.forEach { (from, to) ->
Expand Down Expand Up @@ -85,6 +91,10 @@ fun Project.applyLibrariesConfiguration() {
from({
altConfigFiles("sources")
})

// Yeet module-info's
exclude("module-info.java")

relocations.forEach { (from, to) ->
val filePattern = Regex("(.*)${from.replace('.', '/')}((?:/|$).*)")
val textPattern = Regex.fromLiteral(from)
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jlibnoise = "1.0.0"
jchronic = "0.2.4a"
lz4-java = "1.8.0"
lz4-stream = "1.0.0"
lin-bus-bom = "0.1.0-SNAPSHOT"

## Internal
adventure-text-minimessage = "4.2.0-SNAPSHOT"
text-adapter = "3.0.6"
Expand Down
2 changes: 1 addition & 1 deletion worldedit-bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ applyShadowConfiguration()
repositories {
maven {
name = "PaperMC"
url = uri("https://repo.papermc.io/repository/maven-public/")
url = uri("https://papermc.io/repo/repository/maven-public/")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as last comment

}
maven {
name = "EngineHub"
Expand Down
13 changes: 13 additions & 0 deletions worldedit-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ dependencies {
implementation("com.google.guava:guava")
implementation("com.google.code.gson:gson")

implementation(libs.jchronic) {
exclude(group = "junit", module = "junit")
}
implementation("com.thoughtworks.paranamer:paranamer:2.6")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Paranamer is built in to Java 8 onwards, we don't need to add it, hence we removed it years ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be fixed in the next commit.

implementation(libs.jlibnoise)
api(platform("org.enginehub.lin-bus:lin-bus-bom:0.1.0-SNAPSHOT"))
api("org.enginehub.lin-bus:lin-bus-tree:0.1.0-SNAPSHOT") {
exclude(group = "org.jetbrains", module = "annotations")
}
api("org.enginehub.lin-bus.format:lin-bus-format-snbt:0.1.0-SNAPSHOT") {
exclude(group = "org.jetbrains", module = "annotations")
}

// Platform expectations
implementation("org.yaml:snakeyaml")

Expand Down
10 changes: 5 additions & 5 deletions worldedit-libs/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ dependencies {
"shade"(libs.adventureTextSerializerGson)
"shade"(libs.adventureTextSerializerLegacy)
"shade"(libs.adventureTextSerializerPlain)
"shade"(libs.jchronic) {
exclude(group = "junit", module = "junit")
}
"shade"(libs.jlibnoise)
"shade"(libs.piston)
"shade"(libs.pistonRuntime)
"shade"(libs.pistonImpl)
"shade"(libs.adventureNbt)
// Linbus
"shade"("org.enginehub.lin-bus:lin-bus-common:0.1.0-SNAPSHOT")
"shade"("org.enginehub.lin-bus:lin-bus-stream:0.1.0-SNAPSHOT")
"shade"("org.enginehub.lin-bus:lin-bus-tree:0.1.0-SNAPSHOT")
"shade"("org.enginehub.lin-bus.format:lin-bus-format-snbt:0.1.0-SNAPSHOT")
}