I'm not sure what this warning is trying to tell m...
# compose-desktop
m
I'm not sure what this warning is trying to tell me, I already have the annotation it asks about. Is this a bug or am I missing something?
r
I’ve seen this bug a lot in my own Compose Desktop apps
1
a
Use `-opt-in`;
-Xopt-in
was before Kotlin 1.6
m
I've tried it already but it also doesn't make the warning go away.
a
What’s the library you’re opting in?
m
implementation(compose.desktop.components.animatedImage)
a
I know there’s a bug with file-level opt-ins. Maybe it applies to gradle too…
Interesting. I’m not getting anything, and I don’t have any free compiler args
What version of Kotlin are you using?
m
Without it the Gradle file refuses to even sync. Kotlin 1.9.0
a
I mean with the
@OptIn
but without the free compiler arg
I’m on Kotlin 1.9.21
m
Still getting the warning on 1.9.21
a
Try the Clean/Invalidate Caches/Restart dance.
m
Didn't help, but this is looking suspicious. I'm not sure what it is, I ran the gradle
dependencies
task and there is no
1.6.21
anywhere.
a
Can you ctrl-space and see if you can use a different
OptIn
?
Ah, I know, nm
The gradle script itself is running in Kotlin 1.6.21
👍🏻 1
That’s where it’s from
Look in gradle/wrapper/gradle-wrapper.properties and maybe update to a newer version. But in general, the version of Kotlin gradle is using will be fairly old.
I have
Copy code
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
m
That was is! I updated it from 7.5.1 to 8.5 and now the warning is gone. Thank you.
a
Glad I could help