Skip to content

Commit

Permalink
refactor(cocoapods): Turn resolveDependencies() into an expression
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Jul 16, 2024
1 parent 5d6827c commit 8978ee4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class CocoaPods(

override fun beforeResolution(definitionFiles: List<File>) = checkVersion()

override fun resolveDependencies(definitionFile: File, labels: Map<String, String>): List<ProjectAnalyzerResult> {
return stashDirectories(Os.userHomeDirectory.resolve(".cocoapods/repos")).use {
override fun resolveDependencies(definitionFile: File, labels: Map<String, String>): List<ProjectAnalyzerResult> =
stashDirectories(Os.userHomeDirectory.resolve(".cocoapods/repos")).use {
// Ensure to use the CDN instead of the monolithic specs repo.
run("repo", "add-cdn", "trunk", "https://cdn.cocoapods.org", "--allow-root")

Expand All @@ -103,7 +103,6 @@ class CocoaPods(
podspecCache.clear()
}
}
}

private fun resolveDependenciesInternal(definitionFile: File): List<ProjectAnalyzerResult> {
val workingDir = definitionFile.parentFile
Expand Down

0 comments on commit 8978ee4

Please sign in to comment.