mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-19 19:19:54 +08:00
[build] Support '~' in disabling build targets. e.g. '~others'
This commit is contained in:
parent
a6af7e82ea
commit
5c4a3aeb38
@ -101,12 +101,16 @@ fun isTargetEnabled(name: String): Boolean {
|
||||
return when {
|
||||
name in ENABLED_TARGETS -> true // explicitly enabled
|
||||
"!$name" in ENABLED_TARGETS -> false // explicitly disabled
|
||||
"~$name" in ENABLED_TARGETS -> false // explicitly disabled
|
||||
|
||||
"native" in ENABLED_TARGETS && isNative -> true // native targets explicitly enabled
|
||||
"!native" in ENABLED_TARGETS && isNative -> false // native targets explicitly disabled
|
||||
"~native" in ENABLED_TARGETS && isNative -> false // native targets explicitly disabled
|
||||
|
||||
"!other" in ENABLED_TARGETS -> false // others disabled
|
||||
"~other" in ENABLED_TARGETS -> false // others disabled
|
||||
"!others" in ENABLED_TARGETS -> false // others disabled
|
||||
"~others" in ENABLED_TARGETS -> false // others disabled
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user