[Gradle] Fix CInterop commonization for included builds
KT-58471 Verification Pending
This commit is contained in:
committed by
Space Team
parent
b6a3a60f36
commit
9ead1d84b1
+1
-1
@@ -82,7 +82,7 @@ internal class MetadataDependencyTransformationTaskInputs(
|
|||||||
private fun Configuration.withoutProjectDependencies(): FileCollection {
|
private fun Configuration.withoutProjectDependencies(): FileCollection {
|
||||||
return incoming.artifactView { view ->
|
return incoming.artifactView { view ->
|
||||||
view.componentFilter { componentIdentifier ->
|
view.componentFilter { componentIdentifier ->
|
||||||
componentIdentifier !is ProjectComponentIdentifier
|
componentIdentifier !is ProjectComponentIdentifier || !componentIdentifier.build.isCurrentBuild
|
||||||
}
|
}
|
||||||
}.files
|
}.files
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-1
@@ -197,7 +197,14 @@ internal open class CInteropMetadataDependencyTransformationTask @Inject constru
|
|||||||
|
|
||||||
private fun Iterable<MetadataDependencyResolution>.resolutionsToTransform(): List<ChooseVisibleSourceSets> {
|
private fun Iterable<MetadataDependencyResolution>.resolutionsToTransform(): List<ChooseVisibleSourceSets> {
|
||||||
return filterIsInstance<ChooseVisibleSourceSets>()
|
return filterIsInstance<ChooseVisibleSourceSets>()
|
||||||
.applyIf(skipProjectDependencies) { filter { it.dependency.id !is ProjectComponentIdentifier } }
|
.applyIf(skipProjectDependencies) {
|
||||||
|
filterNot {
|
||||||
|
val dependencyId = it.dependency.id
|
||||||
|
// filter out ProjectDependencies but keep the ones which are coming from included builds
|
||||||
|
// i.e. they are ProjectDependencies but have isCurrentBuild = false
|
||||||
|
dependencyId is ProjectComponentIdentifier && dependencyId.build.isCurrentBuild
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user