Compose

Latest Update Current Release
January 29, 2020 0.1.0-dev04

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 {
    def compose_version = "0.1.0-dev04"

    kotlinPlugin "androidx.compose:compose-compiler:$compose_version"
    implementation "androidx.compose:compose-runtime:$compose_version"
}
composeOptions {
    kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129"
    kotlinCompilerExtensionVersion "0.1.0-dev04"
}

For more information about dependencies, see Add build dependencies.

Version 0.1.0-dev

Version 0.1.0-dev04

January 29, 2020

androidx.compose:compose-compiler:0.1.0-dev04 and androidx.compose:compose-runtime:0.1.0-dev04 are released. The commits included in this version can be found here.

API Changes

  • Added areEquivalent callback to MutableState (Ic2ef8)
  • Removed Component and refactor top-level composition APIs (I1f22e)
  • Transform composable calls with composer param (I1691e)
  • Remove Composition classes in favor of Composer base class (Ieadbf)
  • Mark State<T> and MutableState<T> as stable types (b/146557624)
  • Add currentComposerIntrinsic and tests to ensure correct param passing (I133f0)
  • Made ModelObserver single-threaded. (Ica33d)
  • Correctly generate groups around inline composable calls (Ibf739)
  • Remove unused EffectsDsl annotation (Ibe81d)
  • Added a @Stable annotation. Marked Modifier as stable. (Iacba7)
  • Introduced MutableState, State, mutableStateOf APIs (I98291)
  • Refactored effects to @Composable (Ie2686)
  • Improved performance of ObserverMap and ModelObserver. (Ieb9b6)
  • Changed read observations to allow observing non-ComponentNodes. (Ia4d93)