搜索Gradle插件

使用plugins DSL

plugins {
  id("org.jetbrains.kotlin.native.cocoapods") version "2.0.20-RC2"
}

使用旧版插件应用

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org.cn/m2/")
    }
  }
  dependencies {
    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20-RC2")
  }
}

apply(plugin = "org.jetbrains.kotlin.native.cocoapods")

使用plugins DSL

plugins {
  id "org.jetbrains.kotlin.native.cocoapods" version "2.0.20-RC2"
}

使用旧版插件应用

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org.cn/m2/"
    }
  }
  dependencies {
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.20-RC2"
  }
}

apply plugin: "org.jetbrains.kotlin.native.cocoapods"

了解如何将插件应用到子项目中