Skip to content

Use compilerOptions DSL in Kotlin Multiplatform opt-in example #4928

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

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

alibagherifam
Copy link
Contributor

@alibagherifam alibagherifam commented Jun 26, 2025

The code snippet demonstrating how to opt in to using an API in a Kotlin Multiplatform module currently uses the languageSettings DSL. However, its KDoc includes the following note:

Note: The LanguageSettingsBuilder interface will be deprecated in the future. Instead, it is better to use the existing compilerOptions DSL.

The compilerOptions DSL was introduced in Kotlin 2.0.0 and has been stable since Kotlin 2.1.0.

This PR updates the snippet to use compilerOptions, aligning it with the current recommended approach and avoiding the use of a soon-to-be-deprecated API.

`LanguageSettingsBuilder` interface will be deprecated in the future. Instead, it is better to use the existing `compilerOptions` DSL.
@alibagherifam alibagherifam requested a review from a team as a code owner June 26, 2025 21:37
@sarahhaggarty sarahhaggarty self-assigned this Jun 30, 2025
@sarahhaggarty sarahhaggarty self-requested a review June 30, 2025 08:34
@sarahhaggarty sarahhaggarty merged commit ec9b5c5 into JetBrains:master Jun 30, 2025
4 checks passed
@sarahhaggarty
Copy link
Collaborator

Thanks for your contribution @alibagherifam !

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 this pull request may close these issues.

2 participants