From 68c3fa86674a0f57b38e1760f1e5e2787a416ece Mon Sep 17 00:00:00 2001 From: pluu Date: Sat, 18 May 2024 11:43:30 +0900 Subject: [PATCH] Update support with comment --- .../artifacts/AndroidVersionCatalogsLoaderPlugin.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/build-logic/convention/src/main/java/artifacts/AndroidVersionCatalogsLoaderPlugin.kt b/build-logic/convention/src/main/java/artifacts/AndroidVersionCatalogsLoaderPlugin.kt index 950cd55e..a5f24b82 100644 --- a/build-logic/convention/src/main/java/artifacts/AndroidVersionCatalogsLoaderPlugin.kt +++ b/build-logic/convention/src/main/java/artifacts/AndroidVersionCatalogsLoaderPlugin.kt @@ -8,7 +8,6 @@ import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.extra import java.io.File -import java.lang.System.getProperty class AndroidVersionCatalogsLoaderPlugin : Plugin { private val modules: MutableMap = mutableMapOf() @@ -71,15 +70,10 @@ internal class TomlLoader( } private fun Project.loadVersionsLine(line: String) { - val result = VERSION_PATTERN.matchEntire(line) + val result = VERSION_PATTERN.find(line) if (result != null) { val name = result.groups["NAME"]!!.value - // some versions are overridden by gradle/versions_catalog.gradle - val version = when (name) { - in "android-gradle" -> getProperty("androidGradlePluginVersion") - in "buildconfig" -> getProperty("buildConfigPluginVersion") - else -> result.groups["VERSION"]!!.value - } + val version = result.groups["VERSION"]!!.value versions[name] = version } }