With Kotlin 2.0 and the New Kotlin Compose Compile...
# compose
v
With Kotlin 2.0 and the New Kotlin Compose Compiler Should we have
Copy code
buildFeatures {
    compose = true
}
in CMP modules ? This allowed LayoutInspector to work even in CMP Projects If not then how can we use Layout Inspector ?
k
The config is a part of AGP. And the layout inspector is a part of Android Studio. So, yes, as I know
v
And this wont mix up Jetbrains Compose Compiler and Jetpack Compose compiler?
m
That would be a good thing to have, please let us now if the inspector works for your with CMP and AS
v
I was using this before I migrated to Kotlin 2.0 And it worked pretty good
m
That’s good to hear, I remember I tried it before and I didn’t manage to make it work. I will check it.
k
v
without
compose = true
All i see is this And none of my composables
With
compose = true
Everything works But should we enable this? Would it create problems for the Jetbrains Compose Compiler???
kodee happy 1
a
If you just want the layout inspector to work, I think you can also use this:
Copy code
composeCompiler {
    includeSourceInformation = true
}
Setting
buildFeatures.compose = true
also enables previews in android source sets. What problems are you imagining?
v
Not any as such Let me try this
b
Yes, please do keep the compose = true part. It won't cause problems for the compiler
today i learned 1
v
Which to keep
includeSourceInformation
or
compose = true
?
both works
a
depends on whether you need AS specific features like previews and live literals.
v
Just need LayoutInspector
193 Views