Declaring plugin
#
Declaring the plugin#
Common Java/Kotlin projectsIn correponding sub-projects:
- build.gradle
- build.gradle.kts
plugins { ... // java or kotlin plugin id 'io.hkhc.jarbird' version '0.7.0'}// ...
plugins { ... // java or kotlin plugin id("io.hkhc.jarbird") version "0.7.0"}// ...
#
Android projectsIn correponding sub-projects:
- build.gradle
- build.gradle.kts
plugins { id 'com.android.library' id 'kotlin-android' id 'io.hkhc.jarbird-android' version "0.7.0"}
plugins { id("com.android.library") id("kotlin-android") id("io.hkhc.jarbird-android") version "0.7.0"}
#
Root projectFor the root project, we use io.hkhc.jarbird
no matter we have Android sub-projects or not.
jarbird
plugin declaration is not strictly needed in the root project. It is helpful for these cases:
- Save us from specifying plugin version in every sub-projects.
- Declare repositories that all sub-projects will use.