https://kotlinlang.org logo
Title
d

doubov

01/23/2023, 8:18 PM
👋 has anyone run into these warnings before when running
compileIosMainKotlinMetadata
task of a KMP project?
> Task :pgf:domain:compileIosMainKotlinMetadata
w: Could not find "org.jetbrains.kotlin.native.platform.opengl32" in [/Users/doubova/acs/build-mobile, /Users/doubova/.konan/klib, /Users/doubova/.konan/kotlin-native-prebuilt-macos-x86_64-1.7.20/klib/common, /Users/doubova/.konan/kotlin-native-prebuilt-macos-x86_64-1.7.20/klib/platform/ios_arm64]
The whole build is failing because we have
kotlinOptions.allWarningsAsErrors = true
and I was wondering: 1. Why is this happening? 2. Is it possible to ignore this warning in this specific case only? 🙏
2. can be solved with
tasks.withType(KotlinNativeCompile::class.java).all {
    if (name == "compileIosMainKotlinMetadata") {
        kotlinOptions {
            allWarningsAsErrors = false
        }
    }
}
Still trying to understand where #1 comes from
d

doubov

01/26/2023, 5:40 PM
awesome, thanks 🙏