「kotlin-android」のような Plugin ID は使いづらい - Plugin(プラグイン) ID の探し方

以下の関係を公開リポジトリで確認しながら、Plugin ID を見つけていきます。


classpath "org.jetbrains.kotlin:kotlin-serialization:1.7.20"


groupId    : org.jetbrains.kotlin
artifactId : kotlin-serialization
version    : 1.7.20

👉 https://plugins.gradle.org/search?term=org.jetbrains.kotlin.android
👉 https://maven.google.com/web/index.html?q=org.jetbrains.kotlin.android
👉 https://central.sonatype.dev/search?q=org.jetbrains.kotlin.android

 

🔍 1. Gradle Plugins で探す

gradle plugin search
👉 Gradle - Plugins


classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
apply plugin: "org.jetbrains.kotlin.android"


plugins {
  id "org.jetbrains.kotlin.android" version "1.7.20"
}

👉 Gradle - Plugin: org.jetbrains.kotlin.android


classpath "org.gradle.kotlin:gradle-kotlin-dsl-plugins:3.1.0"
apply plugin: "org.gradle.kotlin.kotlin-dsl"


plugins {
  id "org.gradle.kotlin.kotlin-dsl" version "3.1.0"
}

👉 Gradle - Plugin: org.gradle.kotlin.kotlin-dsl


classpath "org.jetbrains.compose:compose-gradle-plugin:1.3.0-alpha01-dev827"
apply plugin: "org.jetbrains.compose"


plugins {
  id "org.jetbrains.compose" version "1.3.0-alpha01-dev827"
}

👉 Gradle - Plugin: org.jetbrains.compose


classpath "com.diffplug.spotless:spotless-plugin-gradle:6.11.0"
apply plugin: "com.diffplug.spotless"


plugins {
  id "com.diffplug.spotless" version "6.11.0"
}

👉 Gradle - Plugin: com.diffplug.spotless


classpath "com.github.ben-manes:gradle-versions-plugin:0.43.0"
apply plugin: "com.github.ben-manes.versions"


plugins {
  id "com.github.ben-manes.versions" version "0.43.0"
}

👉 Gradle - Plugin: com.github.ben-manes.versions

よく使いそうな Owner :

Gradle - prod-plugin-portal-publishing (Gradle)
👉 Gradle - prod-plugin-portal-publishing (Gradle)

Gradle - kotlin (Kotlin Team)👉 Gradle - kotlin (Kotlin Team)

Gradle - jetbrains (JetBrains)
👉 Gradle - jetbrains (JetBrains)

Gradle - jb-compose (JetBrains Compose)
👉 Gradle - jb-compose (JetBrains Compose)

 

🔍 2. Google's Maven Repository で探す

https://maven.google.com/web/index.html
👉 Google's Maven Repository

plugin idgradle.plugin で探すとよい。


plugin.id  : plugin.id.gradle.plugin : plugin.version
{group id} : {artifact id}


{artifact id} = "{plugin id}.gradle.plugin"


Group ID	com.android.application
Artifact ID	com.android.application.gradle.plugin
Version	8.0.0-alpha05


Plugin ID → "com.android.application"

👉 com.android.application - Google's Maven Repository


Group ID	com.android.library
Artifact ID	com.android.library.gradle.plugin
Version	8.0.0-alpha05


Plugin ID → "com.android.library"

👉 com.android.library - Google's Maven Repository


Group ID	com.google.firebase.crashlytics
Artifact ID	com.google.firebase.crashlytics.gradle.plugin
Version	2.9.2


Plugin ID → "com.google.firebase.crashlytics"

👉 com.google.firebase.crashlytics - Google's Maven Repository


Group ID	com.google.gms.google-services
Artifact ID	com.google.gms.google-services.gradle.plugin
Version	4.3.14


Plugin ID → "com.google.google-services"

👉 com.google.gms.google-services - Google's Maven Repository

 

🔍 3. Maval Central で探す

3つあるけど、どれがいいのか。

https://central.sonatype.dev/search
👉 Maven Central - Search ← 👌

https://search.maven.org/
👉 Maven Central Repository Search

https://mvnrepository.com/
👉 Maven Repository: Search/Browse/Explore

hilt, gradle.plugin のように入力して探すと良い。


<groupId>com.google.dagger.hilt.android</groupId>
<artifactId>com.google.dagger.hilt.android.gradle.plugin</artifactId>
<version>2.44</version>


Plugin ID → "com.google.dagger.hilt.android"

👉 Maven Central: com.google.dagger.hilt.android:com.google.dagger.hilt.android.gradle.plugin:2.44


<groupId>app.cash.sqldelight</groupId>
<artifactId>app.cash.sqldelight.gradle.plugin</artifactId>
<version>2.0.0-alpha04</version>


Plugin ID → "app.cash.sqldelight"

👉 Maven Central: app.cash.sqldelight:app.cash.sqldelight.gradle.plugin:2.0.0-alpha04

 

🙆 参考

👉 【Plugin DSL】「com.android.tools.build:gradle」の記述は不要? hatena-bookmark
👉 【Gradle Version Catalog】libs.versions.toml キー名の形式 camelCase vs kebab-case hatena-bookmark
👉 「⚠ This project uses Gradle Version Catalogs: this tool may not behave as expected.」→ 今現在、Gradle Version Catalog には gradle-versions-plugin が必須では? hatena-bookmark


関連ワード:  androidAndroidStudioGooglegradleIDEAJetBrainskmmkotlinKotlin Multiplatform Mobileおすすめツールライブラリ便利な設定開発