Skip to content

Basic Configuration

Here is an introduction to the configuration methods of project features that may be used by BetterAndroid.

View Binding

If you reference ui-component or ui-extension related functions, you need to enable viewBinding in buildFeatures.

kotlin
android {
    buildFeatures {
        viewBinding = true
    }
}

Jetpack Compose

If you reference compose-extension or compose-multiplatform related functions, you need to enable compose in buildFeatures.

Please refer here to set the correct kotlinCompilerExtensionVersion.

kotlin
android {
    composeOptions {
        kotlinCompilerExtensionVersion = "/** Compose Compiler Version */"
    }
    buildFeatures {
        compose = true
    }
}

Released under the Apache-2.0 License