@@ -4,8 +4,6 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
4
4
import org.jetbrains.compose.gradle.kotlinKarmaConfig
5
5
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
6
6
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
7
- import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
8
- import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.util.targets
9
7
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
10
8
11
9
plugins {
@@ -58,8 +56,6 @@ subprojects {
58
56
}
59
57
}
60
58
61
-
62
-
63
59
tasks.withType<KotlinCompile > {
64
60
compilerOptions {
65
61
jvmTarget.set(JvmTarget .JVM_11 )
@@ -143,9 +139,9 @@ subprojects {
143
139
val printTestBundleSize by tasks.registering {
144
140
dependsOn(tasks.named(" jsTest" ))
145
141
doLast {
146
- val bundlePath = buildDir.resolve (
142
+ val bundlePath = layout.buildDirectory.file (
147
143
" compileSync/test/testDevelopmentExecutable/kotlin/${rootProject.name} -${project.name} -test.js"
148
- )
144
+ ).get().asFile
149
145
if (bundlePath.exists()) {
150
146
val size = bundlePath.length()
151
147
println (" ##teamcity[buildStatisticValue key='testBundleSize::${project.name} ' value='$size ']" )
@@ -163,7 +159,7 @@ subprojects {
163
159
val printBundleSize by tasks.registering {
164
160
dependsOn(tasks.named(" jsBrowserDistribution" ))
165
161
doLast {
166
- val jsFile = buildDir.resolve (" distributions/${project.name} .js" )
162
+ val jsFile = layout.buildDirectory.file (" distributions/${project.name} .js" ).get().asFile
167
163
val size = jsFile.length()
168
164
println (" ##teamcity[buildStatisticValue key='bundleSize::${project.name} ' value='$size ']" )
169
165
}
0 commit comments