Deprecated ‘org.jetbrains.kotlin.android’ plugin usage
The ‘org.jetbrains.kotlin.android’ plugin in project ‘:app’ is no longer required for Kotlin support since AGP 9.0.
Solution: Remove both android.builtInKotlin=true and android.newDsl=false from gradle.properties, then migrate to built-in Kotlin.
See https://kotl.in/gradle/agp-built-in-kotlin for more details.
Tag: kotlin
Why are function types stable in Compose
Why are function types stable in Compose? At first, this seems like a strange decision. Lambda expressions can capture mutable or unstable values. Why is () → List stable, if List is unstable? Does it make sense? Yes!
Continue reading Why are function types stable in ComposeMutable objects or properties?
Kotlin 2.4.20
SharedFlow vs StateFlow
https://kt.academy/article/sharedflow_vs_stateflow
StateFlow and SharedFlow seem similar, but they are designed for different use cases, and they should not be confused. Let’s discuss the key differences and usages.
Let’s start with how they work. SharedFlow resembles a broadcast channel—emitted values are delivered to all observers. It allows setting a replay parameter specifying how many past values should be emitted to new observers.