搜索Gradle插件

使用插件DSL

plugins {
  id("org.jetbrains.kotlin.plugin.assignment") version "2.0.20-RC2"
}

使用旧版插件应用

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

apply(plugin = "org.jetbrains.kotlin.plugin.assignment")

使用插件DSL

plugins {
  id "org.jetbrains.kotlin.plugin.assignment" version "2.0.20-RC2"
}

使用旧版插件应用

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

apply plugin: "org.jetbrains.kotlin.plugin.assignment"

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