[KGP] Fix sharing build cache between Windows and Linux
On Windows, path() uses backslash as a file separator, and Mac/Linux are using forward slashes. If friendPathsSet differs, remote build outputs from other platforms can't be reused. This patch uses invariant paths to address the issue. ^KT-63460 Fixed Merge-request: KT-MR-13261 Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
5258e2044d
commit
563c878f20
+1
-1
@@ -111,7 +111,7 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments> @Inject constr
|
|||||||
val buildDirFile = projectLayout.buildDirectory.asFile.get()
|
val buildDirFile = projectLayout.buildDirectory.asFile.get()
|
||||||
return friendPaths
|
return friendPaths
|
||||||
.filter { it.exists() }
|
.filter { it.exists() }
|
||||||
.map { it.normalize().relativeTo(buildDirFile).path }.toSet()
|
.map { it.normalize().relativeTo(buildDirFile).invariantSeparatorsPath }.toSet()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated("Scheduled for removal with Kotlin 2.0", ReplaceWith("moduleName"))
|
@Deprecated("Scheduled for removal with Kotlin 2.0", ReplaceWith("moduleName"))
|
||||||
|
|||||||
Reference in New Issue
Block a user