Jason5lee
01/18/2022, 7:28 AMvar
property that only its get
is PublishedApi
?Joffrey
01/18/2022, 8:12 AM@get:PublishedApi
to annotate only the getter?Vampire
01/18/2022, 8:55 AMJoffrey
01/18/2022, 8:57 AMVampire
01/18/2022, 9:33 AMJoffrey
01/18/2022, 9:38 AMWell then a published api internal val delegating to a non-published api internal varYep, that makes sense if the annotation is not supported on the getter only
you just didn't sound confident that it will workYeah I'm not confident because I never played with
@PublishedApi
directly, so I prefer to write with caution 🙂 but I see no reason why it shouldn't workJason5lee
01/18/2022, 9:42 AM@PublishedApi
function that returns the value of a private var. Thanks for the answers.Joffrey
01/18/2022, 9:45 AM@get:PublishedApi
internal var x: Int = 42
Or did you just prefer with a function?Vampire
01/18/2022, 9:55 AMJason5lee
01/18/2022, 9:58 AM