CocoaPods: Rename user-visible: Cocoapods -> CocoaPods

This commit is contained in:
Ilya Matveev
2019-03-05 14:18:15 +03:00
parent 7ac7ea58f8
commit 226da18e3a
3 changed files with 12 additions and 11 deletions
@@ -62,7 +62,7 @@ open class CocoapodsExtension(private val project: Project) {
get() = _pods
/**
* Add a Cocoapods dependency to the pod built from this project.
* Add a CocoaPods dependency to the pod built from this project.
*/
@JvmOverloads
fun pod(name: String, version: String? = null, moduleName: String = name) {
@@ -80,7 +80,7 @@ open class KotlinCocoapodsPlugin: Plugin<Project> {
val framework = targets.single().binaries.getFramework(requestedBuildType)
project.tasks.create("syncFramework", Sync::class.java) {
it.group = TASK_GROUP
it.description = "Copies a framework for given platform and build type into the cocoapods build directory"
it.description = "Copies a framework for given platform and build type into the CocoaPods build directory"
it.dependsOn(framework.linkTask)
it.from(framework.linkTask.destinationDir)
@@ -96,7 +96,7 @@ open class KotlinCocoapodsPlugin: Plugin<Project> {
project.tasks.create("podspec", PodspecTask::class.java) {
it.group = TASK_GROUP
it.description = "Generates a podspec file for Cocoapods import"
it.description = "Generates a podspec file for CocoaPods import"
it.settings = cocoapodsExtension
it.dependsOn(dummyFrameworkTask)
}
@@ -116,7 +116,7 @@ open class KotlinCocoapodsPlugin: Plugin<Project> {
DefFileTask::class.java
) {
it.pod = pod
it.description = "Generates a def file for Cocoapods dependency ${pod.name} for target ${target.name}"
it.description = "Generates a def file for CocoaPods dependency ${pod.name} for target ${target.name}"
// This task is an implementation detail so we don't add it in any group
// to avoid showing it in the `tasks` output.
}
@@ -156,7 +156,7 @@ open class KotlinCocoapodsPlugin: Plugin<Project> {
companion object {
const val EXTENSION_NAME = "cocoapods"
const val TASK_GROUP = "cocoapods"
const val TASK_GROUP = "CocoaPods"
// We don't move these properties in PropertiesProvider because
// they are not intended to be overridden in local.properties.
@@ -14,7 +14,7 @@ import java.io.File
/**
* The task generates a podspec file which allows a user to
* integrate a Kotlin/Native framework into a Cocoapods project.
* integrate a Kotlin/Native framework into a CocoaPods project.
*/
open class PodspecTask : DefaultTask() {
@@ -25,6 +25,7 @@ open class PodspecTask : DefaultTask() {
lateinit var settings: CocoapodsExtension
// TODO: Handle Framework name customization - rename the framework during sync process.
// TODO: Support fat arm32/arm64 frameworks.
@TaskAction
fun generate() {
val frameworkDir = project.cocoapodsBuildDirs.framework.relativeTo(outputFile.parentFile).path
@@ -82,12 +83,12 @@ open class PodspecTask : DefaultTask() {
/**
* Creates a dummy framework in the target directory.
*
* We represent a Kotlin/Native module to Cocoapods as a vendored framework.
* Cocoapods needs access to such frameworks during installation process to obtain
* We represent a Kotlin/Native module to CocoaPods as a vendored framework.
* CocoaPods needs access to such frameworks during installation process to obtain
* their type (static or dynamic) and configure the XCode project accordingly.
* But we cannot build the real framework before installation because it may
* depend on Cocoapods libraries which are not downloaded and built at this stage.
* So we create a dummy static framework to allow Cocoapods install our pod correctly
* depend on CocoaPods libraries which are not downloaded and built at this stage.
* So we create a dummy static framework to allow CocoaPods install our pod correctly
* and then replace it with the real one during a real build process.
*/
open class DummyFrameworkTask : DefaultTask() {
@@ -158,7 +159,7 @@ open class DummyFrameworkTask : DefaultTask() {
}
/**
* Generates a def-file for the given Cocoapods dependency.
* Generates a def-file for the given CocoaPods dependency.
*/
open class DefFileTask : DefaultTask() {