I have an Android app (regular kotlin-android; not multiplatform) that is using the `org.jetbrains.c...
e
I have an Android app (regular kotlin-android; not multiplatform) that is using the
org.jetbrains.compose
plugin and the Jetbrains compose artifacts (which should redirect to the Google artifacts). I started writing some tests for it, but the compose artifacts aren't visible in the test code. For example, if I have
implementation(compose.material)
,
android.compose.material.Text
doesn't resolve in a test file in the IDE, even though it runs fine. Adding
testImplementation(compose.material)
doesn't work either. I have to explicitly depend on the Google artifacts in order for the IDE to resolve the type. I'm using Electric Eel latest alpha.
b
I suspect jb compose adds google deps as implementation as opposed to api as not to pollute CfD project namespaces
Which would explain why it still plays nice with google compose, but doesn't surface their dependencies for you.
e
I thought that
testImplementation
includes all dependencies from
implementation
? So it shouldn't need to be
api
. In any case, the issue is that the types don't resolve even when there's an explicit
testImplementation
dependency on the Jetbrains compose artifacts. I'm assuming the issue is with the redirecting to the Google artifacts for test configurations, or an issue with Gradle metadata.
b
I thought that testImplementation includes all dependencies from implementation? So it shouldn't need to be api.
That's true. I meant jb library itself does not expose androidx artefacts as transitive dependencies