commit | 534a3460f3e9585eeda2b4e39fa36a3a514a909c | [log] [tgz] |
---|---|---|
author | Leland Richardson <lelandr@google.com> | Wed Feb 05 23:26:02 2020 -0800 |
committer | Leland Richardson <lelandr@google.com> | Wed Feb 12 15:07:55 2020 -0800 |
tree | 15306d24d1cda4c0cb6d5def232302722d203491 | |
parent | 734c83c17473131223455d4276161f30de9668b7 [diff] |
Turn on Composer Param rewriting code generation strategy relnote: “Updated the `ComposeFlags.COMPOSER_PARAM` flag to be `true`, which will change the code generation strategy for the compose plugin. At a high level, this causes @Composable functions to be generated with an additional synthetic parameter, which is passed through to subsequent @Composable calls in order for the runtime to properly manage execution. This is a significant binary breaking change, however, should preserve source-level compatibility in all sanctioned usage of compose.” This effort has been a work in progress for some time, and most of the code which this flag enables has been added in previous commits. Links to these commits can be found below: Fix final composables in non-final classes (52, 0) https://android-review.googlesource.com/c/platform/frameworks/support/+/1224219 Fix a few corner cases that break the composer param flag (19, 15) https://android-review.googlesource.com/c/platform/frameworks/support/+/1220520 Fix dex naming corner cases in compose runtime (65, 18) https://android-review.googlesource.com/c/platform/frameworks/support/+/1224216 Fix inlining with composer param flag (201, 4) https://android-review.googlesource.com/c/platform/frameworks/support/+/1221901 Fix inner class transforms with Composer Param (81, 5) https://android-review.googlesource.com/c/platform/frameworks/support/+/1218286 Fix inline property getters with Composer Param (147, 8) https://android-review.googlesource.com/c/platform/frameworks/support/+/1218287 Fix multifile symbol remapping issue (514, 327) https://android-review.googlesource.com/c/platform/frameworks/support/+/1217405 Refactor Composer Param flag to not depend on SyntheticIrExtension (83, 100) https://android-review.googlesource.com/c/platform/frameworks/support/+/1215921 Refactor ObservePatcher to work with Composer Param (617, 289) https://android-review.googlesource.com/c/platform/frameworks/support/+/1215621 Fix orphanned symbols from composer param transforms (133, 1) https://android-review.googlesource.com/c/platform/frameworks/support/+/1214982 Add Model class generation phase with Composer Param (4, 2) https://android-review.googlesource.com/c/platform/frameworks/support/+/1214983 Fix inlining for composer param codegen (145, 66) https://android-review.googlesource.com/c/platform/frameworks/support/+/1212446 Run all passing tests with Composer Param flag on and off (341, 289) https://android-review.googlesource.com/c/platform/frameworks/support/+/1211287 Remove Component and refactor top-level composition APIs (1489, 3531) https://android-review.googlesource.com/c/platform/frameworks/support/+/1209009 Transform composable calls with composer param (500, 170) https://android-review.googlesource.com/c/platform/frameworks/support/+/1208485 Cross-module composer param with synthetic decoys (561, 62) https://android-review.googlesource.com/c/platform/frameworks/support/+/1206252 Remove Composition classes in favor of Composer base class (294, 464) https://android-review.googlesource.com/c/platform/frameworks/support/+/1204929 Guard for circular composable references in param transformer (21, 3) https://android-review.googlesource.com/c/platform/frameworks/support/+/1205292 Add tests for composability of different function scopes (227, 0) https://android-review.googlesource.com/c/platform/frameworks/support/+/1201582 Add a few more composer param tests (100, 0) https://android-review.googlesource.com/c/platform/frameworks/support/+/1202047 Add currentComposerIntrinsic and tests to ensure correct param passing (272, 19) https://android-review.googlesource.com/c/platform/frameworks/support/+/1202044 Make composable invoke outside of composable scope error (20, 10) https://android-review.googlesource.com/c/platform/frameworks/support/+/1202042 Basic Composer Param Rewriting (754, 0) https://android-review.googlesource.com/c/platform/frameworks/support/+/1196950 Change-Id: I7971ca1b6525440c38643953645fa388131e31f0
Jetpack is a suite of libraries, tools, and guidance to help developers write high-quality apps easier. These components help you follow best practices, free you from writing boilerplate code, and simplify complex tasks, so you can focus on the code you care about.
Jetpack comprises the androidx.*
package libraries, unbundled from the platform APIs. This means that it offers backward compatibility and is updated more frequently than the Android platform, making sure you always have access to the latest and greatest versions of the Jetpack components.
Our official AARs and JARs binaries are distributed through Google Maven.
You can learn more about using it from Android Jetpack landing page.
When contributing to Jetpack, follow the code review etiquette.
We are not currently accepting new modules.
NOTE: You will need to use Linux or Mac OS. Building under Windows is not currently supported.
repo
(Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see the Repo Command Reference)mkdir ~/bin PATH=~/bin:$PATH curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
git config --global user.name "Your Name" git config --global user.email "you@example.com"
mkdir androidx-master-dev cd androidx-master-dev
repo
command to initialize the repository.repo init -u https://android.googlesource.com/platform/manifest -b androidx-master-dev
repo sync -j8 -c
You will use this command to sync your checkout in the future - it’s similar to git fetch
To open the project with the specific version of Android Studio recommended for developing:
cd path/to/checkout/frameworks/support/ ./studiow
and accept the license agreement when prompted. Now you're ready edit, run, and test!
If you get “Unregistered VCS root detected” click “Add root” to enable git integration for Android Studio.
If you see any warnings (red underlines) run Build > Clean Project
.
You can do most of your work from Android Studio, however you can also build the full AndroidX library from command line:
cd path/to/checkout/frameworks/support/ ./gradlew createArchive
You can build maven artifacts locally, and test them directly in your app:
./gradlew createArchive
And put the following at the top of your ‘repositories’ property in your project build.gradle
file:
maven { url '/path/to/checkout/out/androidx/build/support_repo/' }
Our continuous integration system builds all in progress (and potentially unstable) libraries as new changes are merged. You can manually download these AARs and JARs for your experimentation.
Run FooBarTest
Run androidx.foobar
The AndroidX repository has a set of Android applications that exercise AndroidX code. These applications can be useful when you want to debug a real running application, or reproduce a problem interactively, before writing test code.
These applications are named either <libraryname>-integration-tests-testapp
, or support-\*-demos
(e.g. support-4v-demos
or support-leanback-demos
). You can run them by clicking Run > Run ...
and choosing the desired application.
Before uploading your first contribution, you will need setup a password and agree to the contribution agreement:
Generate a HTTPS password: https://android-review.googlesource.com/new-password
Agree to the Google Contributor Licenses Agreement: https://android-review.googlesource.com/settings/new-agreement
cd path/to/checkout/frameworks/support/ repo start my_branch_name . # make needed modifications... git commit -a repo upload --current-branch .
If you see the following prompt, choose always
:
Run hook scripts from https://android.googlesource.com/platform/manifest (yes/always/NO)?
If the upload succeeds, you'll see output like:
remote: remote: New Changes: remote: https://android-review.googlesource.com/c/platform/frameworks/support/+/720062 Further README updates remote:
To edit your change, use git commit --amend
, and re-upload.
AndroidX uses git to store all the binary Gradle dependencies. They are stored in prebuilts/androidx/internal
and prebuilts/androidx/external
directories in your checkout. All the dependencies in these directories are also available from google()
, jcenter()
, or mavenCentral()
. We store copies of these dependencies to have hermetic builds. You can pull in a new dependency using our importMaven tool.