Property fetching logic in ProjectExtensionsKt.findProperty(name): String? is not compatible with Gradle Project Isolation. Relevant exception when configuration-cache and isolated projects are enabled:
Exception at `co.touchlab.kmmbridge.ProjectExtensionsKt.findStringProperty(ProjectExtensions.kt:25)`
org.gradle.api.InvalidUserCodeException: Project ':feature:some_kmp_feature' cannot access 'Project.extensions' functionality on another project ':'
at org.gradle.api.internal.project.MutableStateAccessAwareProject.getExtensions(MutableStateAccessAwareProject.java:107)
at co.touchlab.kmmbridge.ProjectExtensionsKt.findStringProperty(ProjectExtensions.kt:25)
at co.touchlab.kmmbridge.BaseKMMBridgePlugin.apply(KMMBridge.kt:56)
at co.touchlab.kmmbridge.github.KMMBridgeGitHubPlugin.apply(KMMBridgeGitHubPlugin.kt:16)
at co.touchlab.kmmbridge.github.KMMBridgeGitHubPlugin.apply(KMMBridgeGitHubPlugin.kt:13)
Ideally, providers.gradleProperty(name).getOrNull() should be used if the configuration solely relies on properties declared in gradle.properties or passed via -P through CLI. The currently used ExtraPropertiesExtension has other usecases too.
Let me know if you want a reproducer project for this. But it should be easy to get this failure in any sample project that has configuration-cache + project isolation enabled.
Property fetching logic in ProjectExtensionsKt.findProperty(name): String? is not compatible with Gradle Project Isolation. Relevant exception when configuration-cache and isolated projects are enabled:
Ideally,
providers.gradleProperty(name).getOrNull()should be used if the configuration solely relies on properties declared ingradle.propertiesor passed via-Pthrough CLI. The currently used ExtraPropertiesExtension has other usecases too.Let me know if you want a reproducer project for this. But it should be easy to get this failure in any sample project that has configuration-cache + project isolation enabled.