blob: f50ae062d01acfee4893bb114b8842effeb3fbd0 [file] [log] [blame] [view]
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +00001# Jetpack Compose
2## Intro
3Jetpack Compose is a suite of libraries within the AndroidX ecosystem. For more information, see our [project page](https://developer.android.com/jetpackcompose)
Jim S3a6490c2019-05-07 14:10:46 -07004
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +00005## Syntax
6Jetpack Compose uses composable functions instead of XML layouts to define UI components. You can
7see this in action in the demos, like `androidx.compose.material.demos.ButtonDemo.kt`. More
Alan Viverette053e7e62020-12-15 10:22:06 -05008information can be found in the [compiler README](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/compiler/README.md).
Jim S3a6490c2019-05-07 14:10:46 -07009
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000010## Compiler
11Composable functions are built using a custom Kotlin compiler plugin. More information about the
Alan Viverette053e7e62020-12-15 10:22:06 -050012compiler plugin is available in [this README](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/compose/compiler/README.md).
Jim S3a6490c2019-05-07 14:10:46 -070013
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000014## Getting started
Alan Viverette053e7e62020-12-15 10:22:06 -050015To try out Jetpack Compose you need to set up the toolchain for AndroidX development. Follow the process [here](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/README.md) to check out the code.
Jim S3a6490c2019-05-07 14:10:46 -070016
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000017To start the required version of Android Studio, you need to run the `ANDROIDX_PROJECTS=COMPOSE ./gradlew studio`
Jim S3a6490c2019-05-07 14:10:46 -070018
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000019 cd path/to/checkout/frameworks/support/
20 ANDROIDX_PROJECTS=COMPOSE ./gradlew studio
Jim S3a6490c2019-05-07 14:10:46 -070021
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000022Also if you would like to build from the command line, all gradle commands need to be run from the
23`frameworks/support` folder. E.g. to build the demo app, run:
Jim S3a6490c2019-05-07 14:10:46 -070024
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000025 cd path/to/checkout/frameworks/support/
26 ./gradlew :compose:integration-tests:demos:installDebug
27
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000028## Structure
Louis Pullen-Freilichc5590fb2021-03-12 17:09:05 +000029Library code for Jetpack Compose lives under the `frameworks/support/compose` directory. Additionally, sample code can be found within each module in the `integration-tests` subdirectories. Run the `demos` app to see examples of components and behavior.
30
31## Guidance and documentation
32
33[Get started with Jetpack Compose](https://goo.gle/compose-docs)
34
35[Samples](https://goo.gle/compose-samples)
36
37[Pathway course](https://goo.gle/compose-pathway)
Jim S3a6490c2019-05-07 14:10:46 -070038
Louis Pullen-Freilich14ccfcb2019-05-08 16:47:38 +010039## Feedback
Alan Viverette053e7e62020-12-15 10:22:06 -050040To provide feedback or report bugs, please refer to the main [AndroidX contribution guide](https://android.googlesource.com/platform/frameworks/support/+/androidx-main/README.md) and report your bugs [here](https://issuetracker.google.com/issues/new?component=612128)
Jim S3a6490c2019-05-07 14:10:46 -070041
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000042[Release notes](https://developer.android.com/jetpack/androidx/releases/compose)
Jim S3a6490c2019-05-07 14:10:46 -070043
Alan Viverette053e7e62020-12-15 10:22:06 -050044[Browse source](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/)
Louis Pullen-Freilich4e59c692020-10-26 18:03:32 +000045
46[Existing open bugs](https://issuetracker.google.com/issues?q=componentid:612128%20status:open)
47
48[File a new bug](https://issuetracker.google.com/issues/new?component=612128)
Louis Pullen-Freilichc5590fb2021-03-12 17:09:05 +000049
50[Slack](https://goo.gle/compose-slack)