Fix misalignment of libs dependencies
Dieser Commit ist enthalten in:
Ursprung
4bbdc059ed
Commit
f51fb1cd88
@ -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,4 +1,5 @@
|
||||
applyLibrariesConfiguration()
|
||||
constrainDependenciesToLibsCore()
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
@ -6,6 +7,7 @@ repositories {
|
||||
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}")
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren