From 226da18e3a5f0c55b7dcc595c377d9e94d8d0322 Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Tue, 5 Mar 2019 14:18:15 +0300 Subject: [PATCH] CocoaPods: Rename user-visible: Cocoapods -> CocoaPods --- .../gradle/plugin/cocoapods/CocoapodsExtension.kt | 2 +- .../plugin/cocoapods/KotlinCocoapodsPlugin.kt | 8 ++++---- .../jetbrains/kotlin/gradle/tasks/CocoapodsTasks.kt | 13 +++++++------ 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/cocoapods/CocoapodsExtension.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/cocoapods/CocoapodsExtension.kt index d4bc0ad96f5..f60e2c69c65 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/cocoapods/CocoapodsExtension.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/cocoapods/CocoapodsExtension.kt @@ -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) { diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/cocoapods/KotlinCocoapodsPlugin.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/cocoapods/KotlinCocoapodsPlugin.kt index 679ce125ebc..88187fc4c8c 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/cocoapods/KotlinCocoapodsPlugin.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/cocoapods/KotlinCocoapodsPlugin.kt @@ -80,7 +80,7 @@ open class KotlinCocoapodsPlugin: Plugin { 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.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 { 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 { 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. diff --git a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/CocoapodsTasks.kt b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/CocoapodsTasks.kt index f3bb1017015..20c1c1e5629 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/CocoapodsTasks.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/tasks/CocoapodsTasks.kt @@ -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() {