[KT-53392] Cocoapods: add deprecation for the direct pod urls.

This commit is contained in:
konstantin.tskhovrebov
2022-07-29 13:01:15 +02:00
committed by Space
parent 3cb4b8ddda
commit fdac190511
2 changed files with 7 additions and 5 deletions
@@ -313,6 +313,7 @@ abstract class CocoapodsExtension @Inject constructor(private val project: Proje
* @param flatten does archive contains subdirectory that needs to be expanded
* @param isAllowInsecureProtocol enables communication with a repository over an insecure HTTP connection.
*/
@Deprecated("Will be removed in a 1.8 version. Use pods published as a git repository instead")
@JvmOverloads
fun url(url: String, flatten: Boolean = false, isAllowInsecureProtocol: Boolean = false): PodLocation = Url(URI(url), flatten, isAllowInsecureProtocol)
@@ -458,12 +458,13 @@ open class KotlinCocoapodsPlugin : Plugin<Project> {
it.podName = project.provider { pod.name.asValidTaskName() }
it.podSource = project.provider<Git> { podSource }
}
is Url -> project.tasks.register(pod.toPodDownloadTaskName, PodDownloadUrlTask::class.java) {
it.podName = project.provider { pod.name.asValidTaskName() }
it.podSource = project.provider<Url> { podSource }
is Url -> {
SingleWarningPerBuild.show(project, "Direct pod downloading by url will be removed in a 1.8 version. Use pods published as a git repository instead.")
project.tasks.register(pod.toPodDownloadTaskName, PodDownloadUrlTask::class.java) {
it.podName = project.provider { pod.name.asValidTaskName() }
it.podSource = project.provider<Url> { podSource }
}
}
else -> return@all
}