Selaa lähdekoodia

[build] Support '~' in disabling build targets. e.g. '~others'

Him188 2 vuotta sitten
vanhempi
commit
5c4a3aeb38
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      buildSrc/src/main/kotlin/HmppConfigure.kt

+ 4 - 0
buildSrc/src/main/kotlin/HmppConfigure.kt

@@ -101,12 +101,16 @@ fun isTargetEnabled(name: String): Boolean {
     return when {
     return when {
         name in ENABLED_TARGETS -> true // explicitly enabled
         name in ENABLED_TARGETS -> true // explicitly enabled
         "!$name" in ENABLED_TARGETS -> false // explicitly disabled
         "!$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 -> 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
+        "~native" in ENABLED_TARGETS && isNative -> false // native targets explicitly disabled
 
 
         "!other" in ENABLED_TARGETS -> false // others 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
+        "~others" in ENABLED_TARGETS -> false // others disabled
         else -> true
         else -> true
     }
     }
 }
 }