Skip to content

Commit

Permalink
[6.0.11][publish] Experimental > update DependencyDownloader
Browse files Browse the repository at this point in the history
  • Loading branch information
Bkm016 committed Jul 11, 2023
1 parent 4f40bce commit c6e3878
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ dependencies {
implementation("org.ow2.asm:asm:9.4")
implementation("org.ow2.asm:asm-util:9.4")
implementation("org.ow2.asm:asm-commons:9.4")
implementation("com.github.bkm016:jar-relocator:1.7-R2")
implementation("me.lucko:jar-relocator:1.5")
// 当时改这个是为了支持 kotlin-relfect 结果失败了忘记恢复,导致 Art 脚本系统全面崩溃
// implementation("com.github.bkm016:jar-relocator:1.7-R2")
implementation("org.tabooproject.reflex:reflex:1.0.19")
implementation("org.tabooproject.reflex:analyser:1.0.19")
}
Expand All @@ -16,7 +18,7 @@ tasks {
include(dependency("org.ow2.asm:asm:9.4"))
include(dependency("org.ow2.asm:asm-util:9.4"))
include(dependency("org.ow2.asm:asm-commons:9.4"))
include(dependency("com.github.bkm016:jar-relocator:1.7-R2"))
include(dependency("me.lucko:jar-relocator:1.5"))
include(dependency("org.tabooproject.reflex:reflex:1.0.19"))
include(dependency("org.tabooproject.reflex:analyser:1.0.19"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void injectClasspath(Set<Dependency> dependencies) {
} else {
// 获取重定向后的文件
String name = file.getName().substring(0, file.getName().lastIndexOf('.'));
File rel = new File(file.getParentFile(), name + "_r_" + Math.abs(relocation.hashCode()) + ".jar");
File rel = new File(file.getParentFile(), name + "_r2_" + Math.abs(relocation.hashCode()) + ".jar");
// 如果文件不存在或者文件大小为 0,就执行重定向逻辑
if (!rel.exists() || rel.length() == 0) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ abstract class CommandComponent(val index: Int, var optional: Boolean, val permi
// 若不满足约束
it.commandRestrict?.exec(context, parameter) == false -> false
// 若不满足建议(启用约束建议)
suggestion?.uncheck == false && suggestion.exec(context)?.none { s -> s.equals(parameter, true) } == true -> false
suggestion?.uncheck == false && suggestion.exec(context)?.none { s -> s == parameter } == true -> false
// 通过
else -> true
}
Expand Down

0 comments on commit c6e3878

Please sign in to comment.