[Gradle][Cocoapods] Private Pods with SSH Git Url not allowed in custom specRepos

#KT-48887

Merge-request: KT-MR-4770
This commit is contained in:
Viacheslav Kormushkin
2021-10-15 06:36:22 +00:00
committed by Space
parent 2676de397c
commit 86c6ca7f5f
2 changed files with 20 additions and 3 deletions
@@ -360,14 +360,14 @@ open class CocoapodsExtension(private val project: Project) {
class SpecRepos { class SpecRepos {
@get:Internal @get:Internal
internal val specRepos = mutableSetOf(URI("https://cdn.cocoapods.org")) internal val specRepos = mutableSetOf("https://cdn.cocoapods.org")
fun url(url: String) { fun url(url: String) {
specRepos.add(URI(url)) specRepos.add(url)
} }
@Input @Input
internal fun getAll(): Collection<URI> { internal fun getAll(): Collection<String> {
return specRepos return specRepos
} }
} }
@@ -663,6 +663,23 @@ private object CocoapodsErrorHandlingUtil {
| |
""".trimMargin() """.trimMargin()
return message return message
} else if (
error.contains("Unable to add a source with url") ||
error.contains("Couldn't determine repo name for URL") ||
error.contains("Unable to find a specification")
) {
message += """
|
| Possible reason: spec repos are not configured correctly.
| Ensure that spec repos are correctly configured for all private pod dependencies:
| cocoapods {
| specRepos {
| url("<private spec repo url>")
| }
| }
|
""".trimMargin()
return message
} }
return null return null
} }