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

Migrate to compiler options DSL in extension which also applied to shared source sets #2824

Closed
wants to merge 1 commit into from

Conversation

KotlinBuild
Copy link

No description provided.

@@ -124,8 +124,12 @@ tasks.withType(KotlinCompilationTask::class).configureEach {
allWarningsAsErrors = true
}
if (overriddenLanguageVersion != null) {
languageVersion = KotlinVersion.fromVersion(overriddenLanguageVersion!!)
freeCompilerArgs.add("-Xsuppress-version-warnings")
kotlin {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is strange to configure extension within the task. I would propose to add compilerOptions DSL upper in the script where kotlin { extension is being configured (line 27):

kotlin {
   compilerOptions {
          // These configuration replaces 'languageSettings' config on line 67
          progressiveMode.set(true)
          optIn.addAll(
                listOf(
                   "kotlin.ExperimentalMultiplatform",
                   "kotlin.ExperimentalSubclassOptIn",
                   "kotlinx.serialization.InternalSerializationApi",
                   "kotlinx.serialization.SealedSerializationApi",
                )
           )
          if (overriddenLanguageVersion != null) {
              languageVersion = KotlinVersion.fromVersion(overriddenLanguageVersion!!)
              freeCompilerArgs.add("-Xsuppress-version-warnings")
          }
    }
    ...

@sandwwraith
Copy link
Member

@Tapchicoma @tbogdanova any updates?

@sandwwraith
Copy link
Member

Closing in favor of #2891

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.

4 participants