yshrsmz / BuildKonfig

BuildConfig for Kotlin Multiplatform Project
Apache License 2.0
729 stars 33 forks source link

Issue With New Compiler Options DSL #160

Closed iammohdzaki closed 6 days ago

iammohdzaki commented 1 month ago

I was trying to integrate buildKonfig lib in fresh KMP project from KMP wizard. After Adding all required steps to integrate I started facing error: Using 'compilerOptions(KotlinCommonCompilerOptions.() -> Unit): Unit' is an error. Kotlin target level compiler options DSL is not available in this release!

This is the current Compiler Options DSL in KMP project: androidTarget { @OptIn(ExperimentalKotlinGradlePluginApi::class) compilerOptions { jvmTarget.set(JvmTarget.JVM_11) } }

I still made it work by replacing this with older compiler options androidTarget { compilations.all { kotlinOptions { jvmTarget = "11" } } }

AbdelrahmanEsam commented 1 month ago

same

valeriyo commented 1 month ago

@iammohdzaki thanks for the workaround!

dinesh-thiyagarajan commented 1 month ago

Faced the same issue, is there any proper fix available for this ? other than this workaround ?

iammohdzaki commented 4 weeks ago

@dinesh-thiyagarajan I guess the Kotlin version needs to be updated to 2.0.0 in this library currently it is 1.9.22. I have raised PR for that https://github.com/yshrsmz/BuildKonfig/pull/162 . Waiting for approval