13
0

Fix misalignment of libs dependencies

Dieser Commit ist enthalten in:
Octavia Togami 2020-03-25 00:51:56 -07:00
Ursprung 4bbdc059ed
Commit f51fb1cd88
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC364524D1983C99
3 geänderte Dateien mit 20 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -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")
}
}
}
}

Datei anzeigen

@ -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}")
}
}

Datei anzeigen

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