Introduce internal property sourceMapBaseDirs for Kotlin2JsCompile
Separate property needed to prevent Gradle snapshotting absolute paths as inputs when passed as compiler argument. To reduce property visibility to external users put it to the impl class which will make it invisible in completion but still usable in Kotlin build.
This commit is contained in:
+6
@@ -16,13 +16,19 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle.dsl
|
||||
|
||||
import org.gradle.api.file.FileCollection
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
|
||||
|
||||
internal class KotlinJsOptionsImpl : KotlinJsOptionsBase() {
|
||||
override var freeCompilerArgs: List<String> = listOf()
|
||||
|
||||
var sourceMapBaseDirs: FileCollection? = null
|
||||
|
||||
override fun updateArguments(args: K2JSCompilerArguments) {
|
||||
super.updateArguments(args)
|
||||
copyFreeCompilerArgsToArgs(args)
|
||||
sourceMapBaseDirs?.let {
|
||||
args.sourceMapBaseDirs = it.asPath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -547,6 +547,13 @@ open class Kotlin2JsCompile : AbstractKotlinCompile<K2JSCompilerArguments>(), Ko
|
||||
return friendPaths.filter { filter(File(it)) }
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
@get:InputFiles
|
||||
@get:Optional
|
||||
@get:PathSensitive(PathSensitivity.RELATIVE)
|
||||
internal val sourceMapBaseDirs: FileCollection?
|
||||
get() = kotlinOptionsImpl.sourceMapBaseDirs
|
||||
|
||||
private fun isHybridKotlinJsLibrary(file: File): Boolean =
|
||||
LibraryUtils.isKotlinJavascriptLibrary(file) && isKotlinLibrary(file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user