[K/JS] Implement file merging for clashed file during per-file compilation
This commit is contained in:
-21
@@ -372,27 +372,6 @@ class Kotlin2JsIrGradlePluginIT : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("per-file with the declarations validation")
|
||||
@GradleTest
|
||||
fun testPerFileProjectWithResultFilesClash(gradleVersion: GradleVersion) {
|
||||
project("kotlin-js-invalid-per-file-project", gradleVersion) {
|
||||
buildAndFail("compileDevelopmentExecutableKotlinJs") {
|
||||
assertTasksFailed(":compileDevelopmentExecutableKotlinJs")
|
||||
assertOutputContains("""
|
||||
|There are two files in module '<kotlin-js-invalid-per-file-project>' that have the similar package and file names.
|
||||
| - Package "com.example" and
|
||||
""".trimMargin())
|
||||
}
|
||||
buildAndFail("compileProductionExecutableKotlinJs") {
|
||||
assertTasksFailed(":compileProductionExecutableKotlinJs")
|
||||
assertOutputContains("""
|
||||
|There are two files in module '<kotlin-js-invalid-per-file-project>' that have the similar package and file names.
|
||||
| - Package "com.example" and path
|
||||
""".trimMargin())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("fully qualified names can be used in the sourcemap")
|
||||
@GradleTest
|
||||
fun testKotlinJsSourceMapGenerateFqNames(gradleVersion: GradleVersion) {
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
plugins {
|
||||
kotlin("js")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
js(IR) {
|
||||
useEsModules()
|
||||
binaries.executable()
|
||||
nodejs()
|
||||
}
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
kotlin.tests.individualTaskReports=true
|
||||
kotlin.js.ir.output.granularity=per-file
|
||||
kotlin.incremental=false
|
||||
kotlin.incremental.js=false
|
||||
kotlin.incremental.js.ir=false
|
||||
kotlin.incremental.js.klib=false
|
||||
kotlin.incremental.multiplatform=false
|
||||
kotlin.incremental.useClasspathSnapshot=false
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package com.example
|
||||
|
||||
@JsExport
|
||||
fun best(): Int {
|
||||
return 42
|
||||
}
|
||||
|
||||
@JsExport
|
||||
fun simpleBest(): Int {
|
||||
return 73
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package com.example
|
||||
|
||||
@JsExport
|
||||
public val foo = 44
|
||||
Reference in New Issue
Block a user