Google is committed to advancing racial equity for Black communities. See how.

Compose Compiler

Transform @Composable functions and enable optimizations with a Kotlin compiler plugin.
Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
November 11, 2020 - - - 1.0.0-alpha07

Structure

Compose is combination of 7 Maven Group Ids within androidx. Each Group contains a targeted subset of functionality, each with it's own set of release notes.

This table explains the groups and links to each set of release notes.

GroupDescription
compose.animationBuild animations in their Jetpack Compose applications to enrich the user experience.
compose.compilerTransform @Composable functions and enable optimizations with a Kotlin compiler plugin.
compose.foundationWrite Jetpack Compose applications with ready to use building blocks and extend foundation to build your own design system pieces.
compose.materialBuild Jetpack Compose UIs with ready to use Material Design Components. This is the higher level entry point of Compose, designed to provide components that match those described at www.material.io.
compose.runtimeFundamental building blocks of Compose's programming model and state management, and core runtime for the Compose Compiler Plugin to target.
compose.uiFundamental components of compose UI needed to interact with the device, including layout, drawing, and input.
uiWorks with the Jetpack Compose library.

Declaring dependencies

To add a dependency on Compose, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    implementation "androidx.compose.compiler:compiler:1.0.0-alpha07"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerVersion "1.4.0"
        kotlinCompilerExtensionVersion "1.0.0-alpha07"
    }
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
    kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs += ["-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check"]
    }
}

For more information about dependencies, see Add build dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.0.0

Version 1.0.0-alpha07

November 11, 2020

androidx.compose.compiler:compiler:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.

New Features

  • Stability Inference & Propagation. The Compose Compiler Plugin will analyze types it compiles to infer whether or not it is eligible for certain optimizations by the runtime. This inferred result is then synthesized as metadata onto the class to be utilized by the compiler in other modules. Furthermore, the runtime result of these inferences is passed along in metadata passed to composable calls during composition. This necessitated a different metadata protocol for composable functions, which means that composable functions compiled with the alpha07 compiler will not be binary compatible with composable functions compiled with any earlier compiler version. (aosp/1431988)

Version 1.0.0-alpha06

October 28, 2020

androidx.compose.compiler:compiler:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

Version 1.0.0-alpha05

October 14, 2020

androidx.compose.compiler:compiler:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

Version 1.0.0-alpha04

October 1, 2020

androidx.compose.compiler:compiler:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

androidx.compose:compose-compiler has been refactored to androidx.compose.compiler:compiler. This is the first release in the new group.