From a7cb17129791bb466cfe86c029955fce62325e1a Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Fri, 15 Mar 2024 18:13:13 +0100 Subject: [PATCH] style(gradle-plugin): Reformat code fluently ro reduce indentation Signed-off-by: Sebastian Schuberth --- .../gradle-plugin/src/main/kotlin/OrtModelBuilder.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/package-managers/gradle-plugin/src/main/kotlin/OrtModelBuilder.kt b/plugins/package-managers/gradle-plugin/src/main/kotlin/OrtModelBuilder.kt index df6fc345f8d71..77f89523c7615 100644 --- a/plugins/package-managers/gradle-plugin/src/main/kotlin/OrtModelBuilder.kt +++ b/plugins/package-managers/gradle-plugin/src/main/kotlin/OrtModelBuilder.kt @@ -167,11 +167,12 @@ internal class OrtModelBuilder : ToolingModelBuilder { when (val id = selectedComponent.id) { is ModuleComponentIdentifier -> { val pomFile = if (selectedComponent is ResolvedComponentResultInternal) { - val repositoryId = runCatching { selectedComponent.repositoryId } - .recoverCatching { - @Suppress("DEPRECATION") - selectedComponent.repositoryName - }.getOrNull() + val repositoryId = runCatching { + selectedComponent.repositoryId + }.recoverCatching { + @Suppress("DEPRECATION") + selectedComponent.repositoryName + }.getOrNull() repositories[repositoryId]?.let { repositoryUrl -> // Note: Only Maven-style layout is supported for now.