Skip to content

Commit

Permalink
[build] Support '~' in disabling build targets. e.g. '~others'
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Nov 24, 2022
1 parent ac4fa07 commit 922ba3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buildSrc/src/main/kotlin/HmppConfigure.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 922ba3e

Please sign in to comment.