use asm fix from adventure-platform-mod
This commit is contained in:
@@ -34,7 +34,7 @@ dependencies {
|
|||||||
compileOnly "net.fabricmc:sponge-mixin:0.15.4+mixin.0.8.7"
|
compileOnly "net.fabricmc:sponge-mixin:0.15.4+mixin.0.8.7"
|
||||||
compileOnly "io.github.llamalad7:mixinextras-common:0.4.1"
|
compileOnly "io.github.llamalad7:mixinextras-common:0.4.1"
|
||||||
// work around minecraft (MDG) forcing ASM 9.3 which is incompatible with the above deps...
|
// work around minecraft (MDG) forcing ASM 9.3 which is incompatible with the above deps...
|
||||||
components.withModule("net.neoforged:minecraft-dependencies", RemoveAsmDependency.class)
|
components.withModule("net.neoforged:minecraft-dependencies", RemoveAsmConstraint.class)
|
||||||
|
|
||||||
api("ca.spottedleaf:concurrentutil:${rootProject.concurrentutil_version}")
|
api("ca.spottedleaf:concurrentutil:${rootProject.concurrentutil_version}")
|
||||||
api("ca.spottedleaf:yamlconfig:${rootProject.yamlconfig_version}")
|
api("ca.spottedleaf:yamlconfig:${rootProject.yamlconfig_version}")
|
||||||
|
|||||||
24
buildSrc/src/main/java/RemoveAsmConstraint.java
Normal file
24
buildSrc/src/main/java/RemoveAsmConstraint.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import java.util.Objects;
|
||||||
|
import org.gradle.api.artifacts.CacheableRule;
|
||||||
|
import org.gradle.api.artifacts.ComponentMetadataContext;
|
||||||
|
import org.gradle.api.artifacts.ComponentMetadataRule;
|
||||||
|
|
||||||
|
@CacheableRule
|
||||||
|
public abstract class RemoveAsmConstraint implements ComponentMetadataRule {
|
||||||
|
@Override
|
||||||
|
public void execute(final ComponentMetadataContext ctx) {
|
||||||
|
ctx.getDetails().allVariants(variants -> {
|
||||||
|
variants.withDependencies(deps -> {
|
||||||
|
deps.forEach(dep -> {
|
||||||
|
if (Objects.equals(dep.getGroup(), "org.ow2.asm")) {
|
||||||
|
if (dep.getVersionConstraint().getStrictVersion() != null) {
|
||||||
|
dep.version(v -> {
|
||||||
|
v.require(v.getStrictVersion());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
import java.util.Objects;
|
|
||||||
import org.gradle.api.artifacts.ComponentMetadataContext;
|
|
||||||
import org.gradle.api.artifacts.ComponentMetadataRule;
|
|
||||||
|
|
||||||
public abstract class RemoveAsmDependency implements ComponentMetadataRule {
|
|
||||||
@Override
|
|
||||||
public void execute(final ComponentMetadataContext ctx) {
|
|
||||||
ctx.getDetails().allVariants(variant -> {
|
|
||||||
variant.withDependencies(deps -> {
|
|
||||||
deps.removeIf(dep -> Objects.equals(dep.getGroup(), "org.ow2.asm"));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user