Skip to content

Commit

Permalink
[K/Wasm] Add the custom formatters artifact to the filter conditions …
Browse files Browse the repository at this point in the history
…of proguard

^KT-72156 Fixed
  • Loading branch information
JSMonk authored and qodana-bot committed Oct 10, 2024
1 parent 85a8bec commit be3034d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,25 @@ class KotlinWasmGradlePluginIT : KGPBaseTest() {
}
}
}

@DisplayName("Browser case works correctly with custom formatters")
@GradleTest
fun testWasmCustomFormattersUsage(gradleVersion: GradleVersion) {
project("wasm-browser-simple-project", gradleVersion) {
buildGradleKts.append(
//language=Kotlin
"""
|
| tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile>().configureEach {
| compilerOptions.freeCompilerArgs.add("-Xwasm-debugger-custom-formatters")
| }
""".trimMargin()
)

build("wasmJsBrowserDistribution") {
assertTasksExecuted(":compileKotlinWasmJs")
assertTasksExecuted(":compileProductionExecutableKotlinWasmJs")
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.gradle
import org.gradle.util.GradleVersion
import org.jetbrains.kotlin.gradle.testbase.*
import org.junit.jupiter.api.DisplayName
import kotlin.io.path.appendText

@MppGradlePluginTests
class WasmConfigurationCacheIT : KGPBaseTest() {
Expand Down
1 change: 1 addition & 0 deletions prepare/compiler/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ val proguard by task<CacheableProguardTask> {
!net/sf/cglib/**,
!META-INF/maven**,
**.class,**.properties,**.kt,**.kotlin_*,**.jnilib,**.so,**.dll,**.txt,**.caps,
custom-formatters.js,
META-INF/services/**,META-INF/native/**,META-INF/extensions/**,META-INF/MANIFEST.MF,
messages/**""".trimIndent()),
packCompiler.map { it.outputs.files.singleFile }
Expand Down

0 comments on commit be3034d

Please sign in to comment.