[Gradle][Minor] Format GranularMetadataTransformation.kt
KT-49933
This commit is contained in:
committed by
Space Team
parent
e498499858
commit
afec974df2
+11
-5
@@ -93,11 +93,13 @@ internal sealed class MetadataDependencyResolution(
|
||||
}
|
||||
|
||||
private typealias ComponentIdentifierKey = String
|
||||
|
||||
/**
|
||||
* This unique key can be used to lookup various info for related Resolved Dependency
|
||||
* that gets serialized
|
||||
*/
|
||||
private val ComponentIdentifier.uniqueKey get(): ComponentIdentifierKey =
|
||||
private val ComponentIdentifier.uniqueKey
|
||||
get(): ComponentIdentifierKey =
|
||||
when (this) {
|
||||
is ProjectComponentIdentifier -> "project ${build.name}$projectPath"
|
||||
is ModuleComponentIdentifier -> "module $group:$module:$version"
|
||||
@@ -322,7 +324,10 @@ internal class GranularMetadataTransformation(
|
||||
params.projectData[componentId.projectPath]?.moduleId?.get()
|
||||
?: error("Cant find project Module ID by ${componentId.projectPath}")
|
||||
} else {
|
||||
ModuleDependencyIdentifier(component.moduleVersion?.group ?: "unspecified", component.moduleVersion?.name ?: "unspecified")
|
||||
ModuleDependencyIdentifier(
|
||||
component.moduleVersion?.group ?: "unspecified",
|
||||
component.moduleVersion?.name ?: "unspecified"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +337,8 @@ internal class GranularMetadataTransformation(
|
||||
|
||||
}
|
||||
|
||||
internal val ResolvedComponentResult.currentBuildProjectIdOrNull get(): ProjectComponentIdentifier? {
|
||||
internal val ResolvedComponentResult.currentBuildProjectIdOrNull
|
||||
get(): ProjectComponentIdentifier? {
|
||||
val identifier = id
|
||||
return when {
|
||||
identifier is ProjectComponentIdentifier && identifier.build.isCurrentBuild -> identifier
|
||||
@@ -368,5 +374,5 @@ private val KotlinMultiplatformExtension.platformCompilationSourceSets: Set<Stri
|
||||
|
||||
internal val GranularMetadataTransformation?.metadataDependencyResolutionsOrEmpty get() = this?.metadataDependencyResolutions ?: emptyList()
|
||||
|
||||
internal val AttributeContainer.containsMultiplatformAttributes: Boolean get() =
|
||||
keySet().any { it.name == KotlinPlatformType.attribute.name }
|
||||
internal val AttributeContainer.containsMultiplatformAttributes: Boolean
|
||||
get() = keySet().any { it.name == KotlinPlatformType.attribute.name }
|
||||
Reference in New Issue
Block a user