:wave: Can the Cocoapods Gradle plugin be used onl...
# multiplatform
n
👋 Can the Cocoapods Gradle plugin be used only to consume a Pod library and not to generate a Podspec?
✅ 1
a
n
Cool, thanks Artem!
j
I've tried using this option myself and it gives me this error:
Copy code
org.gradle.internal.execution.WorkValidationException: A problem was found with the configuration of task ':lib:podGenIos' (type 'PodGenTask').
  - In plugin 'org.jetbrains.kotlin.gradle.scripting.internal.ScriptingKotlinGradleSubplugin' type 'org.jetbrains.kotlin.gradle.targets.native.tasks.PodGenTask' property 'podspec$kotlin_gradle_plugin_common' specifies file '.../project/lib/lib.podspec' which doesn't exist.
    
    Reason: An input file was expected to be present but it doesn't exist.
    
    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.
So I've opted to just add the .podspec files to .gitignore and let them be generated even though I don't need them (my project is a KMP library, not directly consumed by an iOS app). I have a couple modules that generate Kotlin-Objective-C interop and others that use
linkOnly
to only link the binary and the error occurs for both. What are the requirements for when the .podspec is needed and when can
noPodspec()
be safely used?
🤔 1
n
I just added the option and it works out of the box 🤷.
a
@Jeff Lockhart could you file an issue regarding that?
j