I can’t seem to be able to suppress compiler warni...
# multiplatform
s
I can’t seem to be able to suppress compiler warnings against
kotlin.time
APIs. I already have this in my buildscript as mentioned in the docs:
Copy code
kotlin {
  sourceSets {
    all {
      languageSettings.apply {
        useExperimentalAnnotation("kotlin.RequiresOptIn")
        useExperimentalAnnotation("kotlin.time.ExperimentalTime")
      }
    }
}
am I missing something?
r
That seems correct to me, are you getting an actual compiler error or just red code (i.e. try running
gradlew build
)?
e
@saket I have this same issue and I have not been able to reproduce (with a fresh project) https://kotlinlang.slack.com/archives/C19FD9681/p1623320293178400. This used to work while my project was on 4.2.1 but started showing up (iirc) after upgrading to AS beta or canary 😞. Are you able to reproduce it in a new project? We do use a lot of non-widespread gradle stuff eg included builds, custom project & settings plugins, custom sourcesets etc, so not sure if its the gradle setup + new IDE but I am sure it used to work before and now it doesn’t.
s
@rnett ooh, I’m able to compile my project just fine so this is definitely another IDE bug. @efemoney I’m using arctic fox as well. It’s possible studio is at fault here. I’ll try out intellij!
👍 1