[Gradle][Minor] KotlinNativeLink: Rename exportLibrariesResolvedGraph to exportLibrariesResolvedConfiguration
KT-49933
This commit is contained in:
committed by
Space Team
parent
afec974df2
commit
dba20b9d1d
+6
-6
@@ -160,9 +160,9 @@ constructor(
|
|||||||
val processTests: Boolean get() = binary is TestExecutable
|
val processTests: Boolean get() = binary is TestExecutable
|
||||||
|
|
||||||
@get:Classpath
|
@get:Classpath
|
||||||
val exportLibraries: FileCollection get() = exportLibrariesResolvedGraph?.files ?: objectFactory.fileCollection()
|
val exportLibraries: FileCollection get() = exportLibrariesResolvedConfiguration?.files ?: objectFactory.fileCollection()
|
||||||
|
|
||||||
private val exportLibrariesResolvedGraph = if (binary is AbstractNativeLibrary) {
|
private val exportLibrariesResolvedConfiguration = if (binary is AbstractNativeLibrary) {
|
||||||
LazyResolvedConfiguration(project.configurations.getByName(binary.exportConfigurationName))
|
LazyResolvedConfiguration(project.configurations.getByName(binary.exportConfigurationName))
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
@@ -209,14 +209,14 @@ constructor(
|
|||||||
) = Unit
|
) = Unit
|
||||||
|
|
||||||
private fun validatedExportedLibraries() {
|
private fun validatedExportedLibraries() {
|
||||||
if (exportLibrariesResolvedGraph == null) return
|
if (exportLibrariesResolvedConfiguration == null) return
|
||||||
|
|
||||||
val failed = mutableSetOf<ResolvedDependencyResult>()
|
val failed = mutableSetOf<ResolvedDependencyResult>()
|
||||||
exportLibrariesResolvedGraph
|
exportLibrariesResolvedConfiguration
|
||||||
.allDependencies
|
.allDependencies
|
||||||
.filterIsInstance<ResolvedDependencyResult>()
|
.filterIsInstance<ResolvedDependencyResult>()
|
||||||
.forEach {
|
.forEach {
|
||||||
val dependencyFiles = exportLibrariesResolvedGraph.getArtifacts(it).map { it.file }.filterKlibsPassedToCompiler()
|
val dependencyFiles = exportLibrariesResolvedConfiguration.getArtifacts(it).map { it.file }.filterKlibsPassedToCompiler()
|
||||||
if (!apiFiles.files.containsAll(dependencyFiles)) {
|
if (!apiFiles.files.containsAll(dependencyFiles)) {
|
||||||
failed.add(it)
|
failed.add(it)
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ constructor(
|
|||||||
val failedDependenciesList = failed.joinToString(separator = "\n") {
|
val failedDependenciesList = failed.joinToString(separator = "\n") {
|
||||||
val componentId = it.selected.id
|
val componentId = it.selected.id
|
||||||
when (componentId) {
|
when (componentId) {
|
||||||
is ModuleComponentIdentifier -> "|Files: ${exportLibrariesResolvedGraph.getArtifacts(it).map { it.file }}"
|
is ModuleComponentIdentifier -> "|Files: ${exportLibrariesResolvedConfiguration.getArtifacts(it).map { it.file }}"
|
||||||
is ProjectComponentIdentifier -> "|Project ${componentId.projectPath}"
|
is ProjectComponentIdentifier -> "|Project ${componentId.projectPath}"
|
||||||
else -> "|${componentId.displayName}"
|
else -> "|${componentId.displayName}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user