[Gradle, JS] Ignore source maps arguments in cache building
^KT-47751 fixed
This commit is contained in:
committed by
teamcityserver
parent
d82681889b
commit
f73726c330
+17
@@ -282,6 +282,23 @@ internal class CacheBuilder(
|
||||
if (file in visitedFiles) return
|
||||
val compilerArgs = compilerArgsFactory()
|
||||
kotlinOptions.copyFreeCompilerArgsToArgs(compilerArgs)
|
||||
var prevIndex: Int? = null
|
||||
compilerArgs.freeArgs = compilerArgs.freeArgs
|
||||
.filterIndexed { index, arg ->
|
||||
!listOf("-source-map-base-dirs", "-source-map-prefix").any {
|
||||
if (prevIndex != null) {
|
||||
prevIndex = null
|
||||
return@any true
|
||||
}
|
||||
if (arg.startsWith(it)) {
|
||||
prevIndex = index
|
||||
return@any true
|
||||
}
|
||||
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
compilerArgs.freeArgs = compilerArgs.freeArgs
|
||||
.filterNot { arg ->
|
||||
IGNORED_ARGS.any {
|
||||
|
||||
Reference in New Issue
Block a user