[Gradle] ExtraPropertiesExtension.getOrPut: Use castIsolatedKotlinPluginClassLoaderAware

To provide better error messages for users when this function
fails due to isolated classpaths

... for KT-56712
This commit is contained in:
Sebastian Sellmair
2023-02-16 10:19:44 +01:00
committed by Space Team
parent 45a99d197a
commit 70a44ccc67
@@ -13,7 +13,8 @@ internal inline fun <reified T : Any> ExtraPropertiesExtension.getOrPut(key: Str
if (!has(key)) {
set(key, provideValue())
}
get(key) as T
val value = get(key) ?: throw NullPointerException("Null extra in for $key")
value.castIsolatedKotlinPluginClassLoaderAware()
}
}