mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 07:30:14 +08:00
Exclude everything that pure does not need
This commit is contained in:
parent
5e3039f866
commit
3408502f99
@ -73,6 +73,7 @@ dependencies {
|
||||
}
|
||||
ext {
|
||||
// 傻逼 compileAndRuntime 没 exclude 掉
|
||||
// 傻逼 gradle 第二次配置 task 会覆盖掉第一次的配置
|
||||
val x: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar.() -> Unit = {
|
||||
dependencyFilter.exclude {
|
||||
when ("${it.moduleGroup}:${it.moduleName}") {
|
||||
|
@ -1,31 +0,0 @@
|
||||
import net.mamoe.mirai.console.command.fuzzySearch
|
||||
import net.mamoe.mirai.console.command.fuzzySearchOnly
|
||||
|
||||
class Him188(val name:String){
|
||||
override fun toString(): String {
|
||||
return name
|
||||
}
|
||||
}
|
||||
|
||||
fun main(){
|
||||
val list = listOf(
|
||||
Him188("111122"),
|
||||
Him188("H1hsncm"),
|
||||
Him188("Ahsndb1"),
|
||||
Him188("Him188"),
|
||||
Him188("aisb11j2"),
|
||||
Him188("aisndnme"),
|
||||
Him188("a9su102"),
|
||||
Him188("nmsl"),
|
||||
Him188("Him1888"),
|
||||
Him188("Him18887")
|
||||
)
|
||||
val s1 = list.fuzzySearch("Him1888"){
|
||||
it.name
|
||||
}
|
||||
val s2 = list.fuzzySearchOnly("Him1888"){
|
||||
it.name
|
||||
}
|
||||
println("S1: $s1")
|
||||
println("S2: $s2")
|
||||
}
|
@ -35,6 +35,21 @@ dependencies {
|
||||
testApi(project(":mirai-console"))
|
||||
}
|
||||
|
||||
ext {
|
||||
// 傻逼 compileAndRuntime 没 exclude 掉
|
||||
// 傻逼 gradle 第二次配置 task 会覆盖掉第一次的配置
|
||||
val x: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar.() -> Unit = {
|
||||
dependencyFilter.include {
|
||||
when ("${it.moduleGroup}:${it.moduleName}") {
|
||||
"org.jline:jline" -> true
|
||||
"org.fusesource.jansi:jansi" -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.set("shadowJar", x)
|
||||
}
|
||||
|
||||
version = Versions.consolePure
|
||||
|
||||
description = "Console Pure CLI frontend for mirai"
|
Loading…
Reference in New Issue
Block a user