Skip to content
🤔 Documentation issue? Report or edit

Project Setup

Android Studio

To use Jetpack Compose you need to use at least a version >= Android Studio Arctic Fox

Gradle Dependencies

Add this inside in the android{} block your build.gradle

android{
//YOUR OTHER CODE

    kotlinOptions {
        jvmTarget = '1.8'
        useIR = true
    }
    buildFeatures {
        compose true
    }
    composeOptions {
        kotlinCompilerExtensionVersion "1.0.0-beta09"
        kotlinCompilerVersion '1.5.10'
    }

}

Below are some Compose dependencies that are online available, can find the others here

dependencies {
    def compose_version = "1.0.0-beta09"

    implementation "androidx.compose.animation:animation-core:$compose_version"
    implementation "androidx.compose.animation:animation:$compose_version"
    implementation("androidx.compose.ui:ui:$compose_version")
    implementation "androidx.compose.foundation:foundation:$compose_version"
    implementation "androidx.compose.ui:ui-geometry:$compose_version"
    implementation "androidx.compose.ui:ui-graphics:$compose_version"
    implementation "androidx.compose.foundation:foundation-layout:$compose_version"
    implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
    implementation "androidx.compose.material:material:$compose_version"
    implementation "androidx.compose.material:material-icons-core:$compose_version"
    implementation "androidx.compose.material:material-icons-extended:$compose_version"
    implementation "androidx.compose.runtime:runtime-rxjava2:$compose_version"
    implementation("androidx.compose.ui:ui-text:$compose_version")
    implementation("androidx.compose.ui:ui-util:$compose_version")
    implementation ("androidx.compose.ui:ui-viewbinding:$compose_version")
    implementation "androidx.compose.ui:ui-tooling:$compose_version"

    //Compose Constraintlayout
    implementation 'androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha07'


}

Last update: June 16, 2021