Correctly detect stdlib in Gradle projects; move detection out of EDT

To detect whether a module has an stdlib in its dependencies, look at
source root modules and not at base module.
This commit is contained in:
Dmitry Jemerov
2017-07-20 18:44:34 +02:00
parent 0971af803c
commit f370d74609
11 changed files with 283 additions and 93 deletions
@@ -55,6 +55,8 @@ inline fun <K, V> MutableMap<K, V>.getOrPutNullable(key: K, defaultValue: () ->
inline fun <T, C: Collection<T>> C.ifEmpty(body: () -> C): C = if (isEmpty()) body() else this
inline fun <K, V, M: Map<K, V>> M.ifEmpty(body: () -> M): M = if (isEmpty()) body() else this
inline fun <T> Array<out T>.ifEmpty(body: () -> Array<out T>): Array<out T> = if (isEmpty()) body() else this
fun <T: Any> MutableCollection<T>.addIfNotNull(t: T?) {