https://kotlinlang.org logo
u

uhe

05/15/2019, 8:55 AM
I'm having trouble setting up
kotlinOptions
in a multiplatform lib project. As per the docs I added this to the
kotlin
section in the lib's `build.gradle`:
Copy code
targets.all {
        compilations.all {
            kotlinOptions {
                suppressWarnings = true // just to see if it's applied
            }
        }
    }
But it does not work (warnings are still displayed in the IDE). Anybody else having issues with these compiler options? I'm using IntelliJ Idea 2019.1.2 and gradle 5.1.1
Side note: To this day I find setting up gradle projects (especially MPP) extremely magical. Lots of copy-pasting from SO and praying to the gradle gods.
a

Alexey Belkov [JB]

06/01/2019, 8:40 AM
You're doing everything correctly. The reason warnings are not being disabled in IDE is because of this bug: https://youtrack.jetbrains.com/issue/KT-23101. The warnings should be properly disabled in the Gradle build.
u

uhe

06/03/2019, 11:17 AM
Oooh, ok. Thanks for the update!