diff --git a/build-logic/convention/src/main/java/com/boostcamp/mapisode/convention/extension/VersionCatalogExtension.kt b/build-logic/convention/src/main/java/com/boostcamp/mapisode/convention/extension/VersionCatalogExtension.kt index 8eb90202..91ddb0fe 100644 --- a/build-logic/convention/src/main/java/com/boostcamp/mapisode/convention/extension/VersionCatalogExtension.kt +++ b/build-logic/convention/src/main/java/com/boostcamp/mapisode/convention/extension/VersionCatalogExtension.kt @@ -6,20 +6,17 @@ import org.gradle.api.artifacts.VersionCatalog import org.gradle.api.artifacts.VersionConstraint import org.gradle.api.provider.Provider -fun VersionCatalog.getBundle(bundleName: String): Provider { - return findBundle(bundleName).orElseThrow { +fun VersionCatalog.getBundle(bundleName: String): Provider = + findBundle(bundleName).orElseThrow { NoSuchElementException("Bundle with name $bundleName not found in the catalog") } -} -fun VersionCatalog.getLibrary(libraryName: String): Provider { - return findLibrary(libraryName).orElseThrow { +fun VersionCatalog.getLibrary(libraryName: String): Provider = + findLibrary(libraryName).orElseThrow { NoSuchElementException("Library with name $libraryName not found in the catalog") } -} -fun VersionCatalog.getVersion(versionName: String): VersionConstraint { - return findVersion(versionName).orElseThrow { +fun VersionCatalog.getVersion(versionName: String): VersionConstraint = + findVersion(versionName).orElseThrow { NoSuchElementException("Version with name $versionName not found in the catalog") } -}