Android Studio Release Process

  1. For every build to be released (canary, beta, rc, or final), on the release branch (e.g. studio-1.4-release), make sure the version number is correct in ./adt-branding/src/idea/AndroidStudioApplicationInfo.xml

    Example:

      <version major="1" minor="4" micro="0" patch="7" full="{0}.{1} RC 1" eap="false" />
                     ~~~       ~~~       ~~~       ~~~      ~~~~~~~~~~~~~~
    

    Make sure version.full value contains words canary, beta or RC (case doesn‘t matter) for canary, beta, RC releases, and don’t have either for stable releases. Code in AndroidStudioUpdateStrategyCustomization.java computes update channel from version.full value:

      <version major="1" minor="4" micro="0" patch="7" full="{0}.{1} RC 1" eap="false" />
                                                       ~~~~~~~~~~~~~~~~~~~
    
  • If it contains words canary or dev then update channel is EAP
  • If it contains words RC or beta then update channel is BETA
  • Otherwise, update channel is RELEASE
  1. Also make sure that the eap= flag in the same file is correct. It should be true for canary and beta builds, false for rc and final:

      <version major="1" minor="4" micro="0" patch="7" full="{0}.{1} RC 1" eap="false" />
                                                                           ~~~~~~~~~~~
    

    Among other things, in VmOptionsGenerator.groovy this causes the isEAP conditional to disable assertions.

  2. IMPORTANT: After any change to ApplicationInfo.xml request the prebuilts to be updated

  3. Replace dev with the appropriate release designator in ../buildSrc/base/version.properties:

    baseVersion = 24.4.0-rc01
    buildVersion = 1.4.0-rc01
                         ~~~~
    

When a new dev branch (like studio-3.1-dev) is created, update studio-main:

  1. Make sure the major/minor version is correctly encoded in the build number listed in build.txt file. It is the second number from the end. If major version is X and minor version is Y, the number is simply XY. For example, 31, 32, 33 for 3.1, 3.2, 3.3 respectively.

    181.2784.17.32.SNAPSHOT
                ~~
    
  2. Make sure the version number is correct in ../adt/idea/native/installer/win/setup_android_studio.nsi

    !define VERSION_MAJOR 3
    !define VERSION_MINOR 2
    
  3. Update the version numbers in ../buildSrc/base/version.properties:

    baseVersion = 26.2.0-dev
    buildVersion = 3.2.0-dev
                  ~~~~
    
  4. Add an entry for the new version in Kotlin compatibility metadata


For AOSP push:

  1. Update the build scripts such that they no longer reference any of the closed source plugins such as the C++ support; this means removing the vendor/ plugin references from .idea/modules.xml, community-main.xml, build/groovy/org/jetbrains/intellij/build/AndroidStudioProperties.groovy, .idea/runConfigurations/OneStudio.xml and the reference in .idea/ant.xml to vendor/google3.

    There are many other smaller tasks to handle as well - updating vcs.xml to not reference unavailable git repositories, etc etc.

    There are three basic tasks: (1) Build the IDE from the command line, and copy the profiler prebuilts

    $ cp tools/idea/out/studio/dist.all/plugins/android/lib/studio-proto.jar \
         tools/adt/idea/android/lib/
    
    $ cp tools/idea/out/studio/dist.all/plugins/android/lib/transport_java_proto.jar \
         tools/adt/idea/android/lib/
    
    $ cp tools/idea/out/studio/dist.all/plugins/android/lib/studio-grpc.jar \
         tools/adt/idea/android/lib/
    
    $ cp tools/idea/out/studio/dist.all/plugins/android/lib/perfetto-protos.jar \
         tools/adt/idea/android/lib/
    
    $ cp-recursive tools/idea/out/studio/dist.all/plugins/android/resources/ \
            prebuilts/tools/common/profiler/$VERSION/
    

    Also add in a README and license file in the new profiler prebuilts folder.

    Then remove the references from build.xml and .idea/build.xml to the adt build.xml file which would run profiler prebuild steps.

    (2) Open the project in IntelliJ, and fix all warnings in the project structure dialog, then make sure the project builds and runs; for this you may have to fix up source code in case there are any dependencies on closed source code that shouldn't be there. For example, right now the appindexing plugin depends on the url-assistant

    (3) Make the build_studio.sh script compile. This involves removing the various cidr plugins and closed source plugins, as well as removing compilation/copy tasks for the gradle offline repository, lldb, etc. Also add a copy task to place the profiler prebuilts into place.

    (4) Ensure that the branch names for the tools/idea and tools/base projects are sensible:

    diff --git a/.idea/.name b/.idea/.name
    index 310ac3d20a3..8a1a9797418 100644
    --- a/.idea/.name
    +++ b/.idea/.name
    @@ -1 +1 @@
    -Android Studio (studio-master-dev)
    \ No newline at end of file
    +Android Studio 3.1
    \ No newline at end of file
    

Relevant CLs from the 3.1 push: Change-Id: I8ca078c08a4fff0a6ebeae8c6ba7a6fa55bec490 Change-Id: I15c8e3ce46099d54e77c17fff0f0d42d11238e3b Change-Id: Ia656d3e023d9887da7aa0486ca934388e75436db

Relevant CLs from the 3.0 AOSP push: https://android-review.googlesource.com/#/q/topic:studio-30

Relevant CLs from the 2.3 AOSP push (though they'll need to be adjusted to account for the big build script changes in 2.4) : Change-Id: I364ee67262524aa27f71831e6ed01164826e54ad Change-Id: I9298c7319ce55fb64c29e38636808e57f2a84209 Change-Id: Ic60a95a21ea0e483d82f6013539d112b89a7d0c0 (AOSP) Change-Id: I42bcad10589b8172a46a3f74aa1e7a5826ea52fc (AOSP)

  1. Remove all references to tools/vendor/google from tools/base/bazel/toplevel.WORKSPACE:
--- a/bazel/toplevel.WORKSPACE
+++ b/bazel/toplevel.WORKSPACE
@@ -1,13 +1,6 @@
 load("//tools/base/bazel:repositories.bzl", "setup_external_repositories")
 setup_external_repositories()

-local_repository(
-      name = "blaze",
-      path = "tools/vendor/google3/blaze",
-)
-load("@blaze//:binds.bzl", "blaze_binds")
-blaze_binds()
-
 http_archive(
   name = "bazel_toolchains",
   urls = [