I have a module that applies the compose plugin, a...
# compose
e
I have a module that applies the compose plugin, and has a class in it:
Copy code
sealed class Navigation {
  data class Account(val id: AccountId) : Navigation()
}
AccountId
comes from another module that doesn't apply the compose plugin and is defined as:
Copy code
interface StringId {
  val raw: String
}

@JvmInline
value class AccountId(override val raw: String): StringId
If I run the compiler metrics on the first module, it shows:
Copy code
stable class Account {
  stable val id: AccountId
  <runtime stability> = Stable
}
I thought that classes coming from another module that doesn't apply the compose plugin will be treated as unstable?
b
Inline classes we take the stability of the underlying type, so string in this case
e
Even though it's from a different module?
x
Compose determines the stability based on the types, not the variables. The "String" type is known by Compose regardless where your variable with that type is declared
👍 1
👍🏾 1