AndroidX Core Team | 2e416b2 | 2020-12-03 22:58:07 +0000 | [diff] [blame^] | 1 | # FAQ |
| 2 | |
| 3 | [TOC] |
| 4 | |
| 5 | ## General FAQ |
| 6 | |
| 7 | ### What is AndroidX? |
| 8 | |
| 9 | The Android Extension (AndroidX) Libraries provide functionality that extends |
| 10 | the capabilities of the Android platform. These libraries, which ship separately |
| 11 | from the Android OS, focus on improving the experience of developing apps |
| 12 | through broad OS- and device-level compatibility, high-level abstractions to |
| 13 | simplify and unify platform features, and other new features that target |
| 14 | developer pain points. To find out more about AndroidX, see the public |
| 15 | documentation on developer.android.com. |
| 16 | |
| 17 | ### Why did we move to AndroidX? |
| 18 | |
| 19 | Please read our |
| 20 | [blog post](https://android-developers.googleblog.com/2018/05/hello-world-androidx.html) |
| 21 | about our migration to AndroidX. |
| 22 | |
| 23 | ### What happened to the Support Library? |
| 24 | |
| 25 | As part of the Jetpack effort to improve developer experience on Android, the |
| 26 | Support Library team undertook a massive refactoring project. Over the course of |
| 27 | 2017 and 2018, we streamlined and enforced consistency in our packaging, |
| 28 | developed new policies around vesioning and releasing, and developed tools to |
| 29 | make it easy for developers to migrate. |
| 30 | |
| 31 | ### Will there be any more updates to Support Library? |
| 32 | |
| 33 | No, Revision 28.0.0 of the Support Library, which launched as stable in |
| 34 | September 2018, was the last feature release in the android.support package. |
| 35 | There will be no further releases under Support Library packaging. |
| 36 | |
| 37 | ### How is AndroidX related to Jetpack? |
| 38 | |
| 39 | They are the same thing! In a sentence, AndroidX is the packaging and |
| 40 | internally-facing development project for all components in Jetpack. Jetpack is |
| 41 | the external branding for libraries within AndroidX. |
| 42 | |
| 43 | In more detail, Jetpack is the external branding for the set of components, |
| 44 | tools, and guidance that improve the developer experience on Android. AndroidX |
| 45 | is the open-source development project that defines the workflow, versioning, |
| 46 | and release policies for ALL libraries included in Jetpack. All libraries within |
| 47 | the androidx Java package follow a consistent set of API design guidelines, |
| 48 | conform to SemVer and alpha/beta revision cycles, and use the Android issue |
| 49 | tracker for bugs and feature requests. |
| 50 | |
| 51 | ### What AndroidX library versions have been officially released? |
| 52 | |
| 53 | You can see all publicly released versions on the interactive |
| 54 | [Google Maven page](https://dl.google.com/dl/android/maven2/index.html). |
| 55 | |
| 56 | ### How do I jetify something? |
| 57 | |
| 58 | The Standalone Jetifier documentation and download link can be found |
| 59 | [here](https://developer.android.com/studio/command-line/jetifier), under the |
| 60 | Android Studio DAC. |
| 61 | |
| 62 | ### How do I update my library version? |
| 63 | |
| 64 | See the steps specified on the version page |
| 65 | [here](versioning.md#how-to-update-your-version). |
| 66 | |
| 67 | ### How do I test my change in a separate Android Studio project? |
| 68 | |
| 69 | If you're working on a new feature or bug fix in AndroidX, you may want to test |
| 70 | your changes against another project to verify that the change makes sense in a |
| 71 | real-world context or that a bug's specific repro case has been fixed. |
| 72 | |
| 73 | If you need to be absolutely sure that your test will exactly emulate the |
| 74 | developer's experience, you can repeatedly build the AndroidX archive and |
| 75 | rebuild your application. In this case, you will need to create a local build of |
| 76 | AndroidX's local Maven repository artifact and install it in your Android SDK |
| 77 | path. |
| 78 | |
| 79 | First, use the `createArchive` Gradle task to generate the local Maven |
| 80 | repository artifact: |
| 81 | |
| 82 | ```shell |
| 83 | # Creates <path-to-checkout>/out/dist/sdk-repo-linux-m2repository-##.zip |
| 84 | ./gradlew createArchive |
| 85 | ``` |
| 86 | |
| 87 | Next, take the ZIP output from this task and extract the contents to the Android |
| 88 | SDK path that you are using for your alternate (non-AndroidX) version of Android |
| 89 | Studio. For example, you may be using `~/Android/SDK/extras` if you are using |
| 90 | the default Android Studio SDK for app development or |
| 91 | `prebuilts/fullsdk-linux/extras` if you are using fullsdk for platform |
| 92 | development. |
| 93 | |
| 94 | ```shell |
| 95 | # Creates or overwrites android/m2repository |
| 96 | cd <path-to-sdk>/extras |
| 97 | unzip <path-to-checkout>/out/dist/top-of-tree-m2repository-##.zip |
| 98 | ``` |
| 99 | |
| 100 | Finally, in the dependencies section of your standalone project's `build.gradle` |
| 101 | file, add or update the `compile` entries to reflect the AndroidX modules that |
| 102 | you would like to test: |
| 103 | |
| 104 | ``` |
| 105 | dependencies { |
| 106 | ... |
| 107 | compile "com.android.support:appcompat-v7:26.0.0-SNAPSHOT" |
| 108 | } |
| 109 | ``` |
| 110 | |
| 111 | ## Version FAQ {#version} |
| 112 | |
| 113 | ### How are changes in dependency versions propagated? |
| 114 | |
| 115 | If you declare `api(project(":depGroupId"))` in your `build.gradle`, then the |
| 116 | version change will occur automatically. While convienent, be intentional when |
| 117 | doing so because this causes your library to have a direct dependency on the |
| 118 | version in development. |
| 119 | |
| 120 | If you declare `api("androidx.depGroupId:depArtifactId:1.0.0")`, then the |
| 121 | version change will need to be done manually and intentionally. This is |
| 122 | considered best practice. |
| 123 | |
| 124 | ### How does a library begin work on a new Minor version? |
| 125 | |
| 126 | Set the version to the next minor version, as an alpha. |
| 127 | |
| 128 | ### How does a library ship an API reference documentation bugfix? |
| 129 | |
| 130 | Developers obtain API reference documentation from two sources -- HTML docs on |
| 131 | [d.android.com](https://d.android.com), which are generated from library release |
| 132 | artifacts, and Javadoc from source JARs on Google Maven. |
| 133 | |
| 134 | As a result, documentation bug fixes should be held with other fixes until they |
| 135 | can go through a normal release cycle. Critical (e.g. P0) documentation issues |
| 136 | **may** result in a [bugfix](loaf.md#bugfix) release independent of other fixes. |
| 137 | |
| 138 | ### When does an alpha ship? |
| 139 | |
| 140 | For public releases, an alpha ships when the library lead believes it is ready. |
| 141 | Generally, these occur during the batched bi-weekly (every 2 weeks) release |
| 142 | because all tip-of-tree dependencies will need to be released too. |
| 143 | |
| 144 | ### Are there restrictions on when or how often an alpha can ship? |
| 145 | |
| 146 | Nope. |
| 147 | |
| 148 | ### Can Alpha work (ex. for the next Minor release) occur in the primary development branch during Beta API lockdown? |
| 149 | |
| 150 | No. This is by design. Focus should be spent on improving the Beta version and |
| 151 | adding documentation/samples/blog posts for usage! |
| 152 | |
| 153 | ### Is there an API freeze window between Alpha and Beta while API surface is reviewed and tests are added, but before the Beta is released? |
| 154 | |
| 155 | Yes. If any new APIs are added in this window, the beta release will be blocked |
| 156 | until API review is complete and addressed. |
| 157 | |
| 158 | ### How often can a Beta release? |
| 159 | |
| 160 | As often as needed, however, releases outside of the bi-weekly (every 2 weeks) |
| 161 | release will need to get approval from the TPM (nickanthony@). |
| 162 | |
| 163 | ### What are the requirements for moving from Alpha to Beta? |
| 164 | |
| 165 | See the [Beta section of Versioning guidelines](versioning.md?#beta) for |
| 166 | pre-release cycle transition requirements. |
| 167 | |
| 168 | ### What are the requirements for a Beta launch? |
| 169 | |
| 170 | See the [Beta section of Versioning guidelines](versioning.md?#beta) for |
| 171 | pre-release cycle transition requirements. |