Skip to content
Permalink
Browse files

Fix misalignment of libs dependencies

  • Loading branch information
octylFractal committed Mar 25, 2020
1 parent 4bbdc05 commit f51fb1cd88a12aee6d00b67c51f257564cc6be85
@@ -1,11 +1,13 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.Project
import org.gradle.api.artifacts.ExternalModuleDependency
import org.gradle.api.artifacts.ModuleDependency
import org.gradle.api.internal.HasConvention
import org.gradle.api.plugins.MavenRepositoryHandlerConvention
import org.gradle.api.tasks.Upload
import org.gradle.api.tasks.bundling.Jar
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.getPlugin
import org.gradle.kotlin.dsl.invoke
@@ -106,3 +108,16 @@ fun Project.applyLibrariesConfiguration() {

applyCommonArtifactoryConfig()
}

fun Project.constrainDependenciesToLibsCore() {
evaluationDependsOn(":worldedit-libs:core")
val coreDeps = project(":worldedit-libs:core").configurations["shade"].dependencies
.filterIsInstance<ExternalModuleDependency>()
dependencies.constraints {
for (coreDep in coreDeps) {
add("shade", "${coreDep.group}:${coreDep.name}:${coreDep.version}") {
because("libs should align with libs:core")
}
}
}
}
@@ -1,11 +1,13 @@
applyLibrariesConfiguration()
constrainDependenciesToLibsCore()

repositories {
maven {
name = "SpigotMC"
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
}

dependencies {
"shade"("net.kyori:text-adapter-bukkit:${Versions.TEXT_EXTRAS}")
}
}
@@ -1,4 +1,5 @@
applyLibrariesConfiguration()
constrainDependenciesToLibsCore()

repositories {
maven {
@@ -8,4 +9,4 @@ repositories {
}
dependencies {
"shade"("net.kyori:text-adapter-spongeapi:${Versions.TEXT_EXTRAS}")
}
}

0 comments on commit f51fb1c

Please sign in to comment.
You can’t perform that action at this time.