Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue With New Compiler Options DSL #160

Closed
iammohdzaki opened this issue Jul 19, 2024 · 4 comments · Fixed by #162
Closed

Issue With New Compiler Options DSL #160

iammohdzaki opened this issue Jul 19, 2024 · 4 comments · Fixed by #162

Comments

@iammohdzaki
Copy link
Contributor

iammohdzaki commented Jul 19, 2024

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" } } }

  • OS: Windows 11
  • BuildKonfig Version v0.15.1
  • Kotlin Version 2.0.0
  • Gradle Version 8.7
@AbdelrahmanEsam
Copy link

same

@valeriyo
Copy link

@iammohdzaki thanks for the workaround!

@dinesh-thiyagarajan
Copy link

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

@iammohdzaki
Copy link
Contributor Author

iammohdzaki commented Aug 8, 2024

@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 #162 . Waiting for approval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants