[Gradle, JS] Fix Native test and not consider artifact in path
This commit is contained in:
+2
-1
@@ -308,7 +308,8 @@ internal class CacheBuilder(
|
|||||||
val dependenciesCacheDirectories = getDependenciesCacheDirectories(
|
val dependenciesCacheDirectories = getDependenciesCacheDirectories(
|
||||||
rootCacheDirectory,
|
rootCacheDirectory,
|
||||||
dependency,
|
dependency,
|
||||||
libraryFilter = { libraryFilter(it.file) }
|
libraryFilter = { libraryFilter(it.file) },
|
||||||
|
considerArtifact = true
|
||||||
) ?: return
|
) ?: return
|
||||||
|
|
||||||
val nameMap: MutableMap<String, ResolvedArtifact> = mutableMapOf()
|
val nameMap: MutableMap<String, ResolvedArtifact> = mutableMapOf()
|
||||||
|
|||||||
+8
-2
@@ -60,13 +60,19 @@ private fun computeDependenciesHash(dependency: ResolvedDependency): String {
|
|||||||
fun getDependenciesCacheDirectories(
|
fun getDependenciesCacheDirectories(
|
||||||
rootCacheDirectory: File,
|
rootCacheDirectory: File,
|
||||||
dependency: ResolvedDependency,
|
dependency: ResolvedDependency,
|
||||||
libraryFilter: (ResolvedArtifact) -> Boolean = { it.file.absolutePath.endsWith(".klib") }
|
libraryFilter: (ResolvedArtifact) -> Boolean = { it.file.absolutePath.endsWith(".klib") },
|
||||||
|
considerArtifact: Boolean = false
|
||||||
): List<File>? {
|
): List<File>? {
|
||||||
return getAllDependencies(dependency)
|
return getAllDependencies(dependency)
|
||||||
.flatMap { childDependency ->
|
.flatMap { childDependency ->
|
||||||
childDependency.moduleArtifacts.map {
|
childDependency.moduleArtifacts.map {
|
||||||
if (libraryFilter(it)) {
|
if (libraryFilter(it)) {
|
||||||
val cacheDirectory = getCacheDirectory(rootCacheDirectory, childDependency, it, libraryFilter)
|
val cacheDirectory = getCacheDirectory(
|
||||||
|
rootCacheDirectory,
|
||||||
|
childDependency,
|
||||||
|
if (considerArtifact) it else null,
|
||||||
|
libraryFilter
|
||||||
|
)
|
||||||
if (!cacheDirectory.exists()) return null
|
if (!cacheDirectory.exists()) return null
|
||||||
cacheDirectory
|
cacheDirectory
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user