1- import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
2-
31/*
42 * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
53 */
64
5+ import static KotlinVersion.*
6+
77apply plugin : ' kotlin-multiplatform'
88apply from : rootProject. file(" gradle/targets.gradle" )
99
2121
2222// TODO: this block should be removed after the switch to Kotlin language version 1.9
2323// (right now it implements a toggle between IR and BOTH JS compiler types for testing of Kotlin dev builds)
24- def isJsLegacyCompilerEnabled = ! KotlinAggregateBuild . isKotlinVersionAtLeast(project, 1 , 9 )
24+ def isJsLegacyCompilerEnabled = ! isKotlinVersionAtLeast(project, 1 , 9 )
2525
2626kotlin {
2727 targets {
@@ -31,7 +31,7 @@ kotlin {
3131 }
3232
3333 // JS -- always
34- // TODO: JS compiler should be switched to IR-only after the switch to Kotlin language version 1.9
34+ // TODO: JS compiler should be switched to IR-only after Kotlin version is updated to 1.9
3535 // (right now compiler type is chosen conditionally for testing of Kotlin dev builds)
3636 def jsCompiler = isJsLegacyCompilerEnabled ? BOTH : IR
3737 js(jsCompiler) {
@@ -162,7 +162,7 @@ dependencies {
162162 transformer project(" :atomicfu-transformer" )
163163}
164164
165- // TODO: this JS Legacy configuration should be removed after the switch to Kotlin language version 1.9
165+ // TODO: This JS Legacy configuration should be removed when Kotlin version is updated to 1.9.0,
166166// (right now configurations are removed conditionally for testing of Kotlin 1.9.0-dev builds)
167167if (isJsLegacyCompilerEnabled) {
168168
@@ -172,7 +172,7 @@ if (isJsLegacyCompilerEnabled) {
172172 ? compileKotlinJsLegacy
173173 : compileKotlinJs
174174
175- tasks. withType(compileJsLegacy) . configureEach {
175+ tasks. withType(compileJsLegacy. getClass()) {
176176 kotlinOptions {
177177 moduleKind = " umd"
178178 sourceMap = true
0 commit comments