Hey, is there a way to disable build warnings for ...
# announcements
j
Hey, is there a way to disable build warnings for a specific warning type? Eg. I would like to disable all
EXPERIMENTAL_API_USAGE
warnings in my project build log
l
I believe you can use
@Suppress
to suppress warnings in-code
j
I'm using gradle for my build if it matters
@LeoColman Yes, but I would like to do it globally, not just for a single file/class
j
@Dennis I use
useExperimentalAnnotation('kotlin.Experimental')
but it doesn't take care of warnings unfortunately 😕
👍 1
d
Did you also do the other part? (gradle, kotlin dsl)
Copy code
tasks.withType<KotlinCompile>().all {
    kotlinOptions.freeCompilerArgs += "-Xuse-experimental=org.mylibrary.ExperimentalMarker"
}
Not sure how it relates, though.
Also supposed to work without the
=org.my.package.stuff
j
Yup yup, still didn't help