diff --git a/README.md b/README.md index c5b6643..ac910aa 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,9 @@ To configure Airin Gradle plugin use `airin` extension in the root `build.gradle Module component is responsible for generating Bazel files for specific types of modules. Every module component is an abstract class that extends the ModuleComponent base class and implements 2 functions, `canProcess` and `onInvoke`. + +It is declared in `buildSrc`, or any other type of module that is included in the classpath of your build configuration. + ```kotlin abstract class AndroidLibraryModule : ModuleComponent { @@ -198,8 +201,12 @@ kt_android_library( ) ``` ## Feature components +Feature component is responsible for contributing to Bazel files generated by a related module component based on a specific build feature. + Every feature component is an abstract class that extends the FeatureComponent base class and implements 2 functions, canProcess and onInvoke. +It is declared in `buildSrc`, or any other type of module that is included in the classpath of your build configuration. + ```kotlin abstract class JetpackComposeFeature : FeatureComponent() { @@ -252,7 +259,7 @@ Here is what's happening in the example above. > and [`RootModule`](https://github.com/Morfly/airin/blob/d2810f569b5da84ec61106a8c85d2b3566b1f7a8/airin-gradle-android/src/main/kotlin/io/morfly/airin/module/RootModule.kt) to learn more. ## Properties -Both module and feature components TODO +Both module and feature components offer an API for declaring properties, that serve as arguments that allow additional customization when configuring `airin` plugin. ```kotlin // root build.gradle.kts airin { @@ -264,7 +271,7 @@ airin { } } ``` - +To declare a property in a custom component use `property` delegate and provide a default value. ```kotlin abstract class AndroidToolchainFeature : FeatureComponent() { val rulesKotlinVersion: String by property(default = "1.8.1")