//tools/adt/idea
SDK_PLATFORM
for the platform to use:linux/android-studio
darwin/android-studio/Contents
windows/android-studio
If you are using IntelliJ 2020.2 or earlier, create a template JUnit configuration as described in Running tests using IntelliJ
go/ab
The official way of updating prebuilts that can be commited to prebuilts/studio/intellij-sdk
is to get them from the go/ab
target here.
First identify the <bid>
you want to update to. If you want to know what is the current build checked in into prebuilts you can look at the METADATA file.
Then you can run the following command:
./tools/adt/idea/studio/update_sdk.py --download <bid>
which will update tools/adt/idea
and prebuilts/studio/intellij-sdk
with the new prebuilts. Note that if there jars are the same and there are no major version changes, tools/adt/idea
won't need to be updated. At this point you are ready to upload the changes for review.
In order to locally try changes to the platform, the prebuilts can be rebuilt as follows:
cd $SRC/tools/idea ./build_studio.sh
which will generate a set of artifacts in tools/idea/out/studio/dist
. To update the prebuilts with these, run:
$SRC/tools/adt/idea/studio/update_sdk.py --path $SRC/tools/idea/out/studio/dist
Note that in go/ab
the prebuilts are built on a separate checkout to ensure that the ant
build only has access to a few git repos. If you want to have an isolated check out to build prebuilts you can checkout a separate repo like this:
repo init -u sso://googleplex-android.git.corp.google.com/platform/manifest -b studio-master-dev -m studio-sdk.xml repo sync -j10
And execute update_sdk.py
from the main repo with the path pointing to this isolated checkout.
To build Android Studio run
bazel build //tools/adt/idea/studio:android-studio
IntelliJ has a post-build process to generate an index for things that can be searched in the UI. They perform this operation by running the IDE headless with a “traverseUI” argument. All these generated files are stored in searchable-options
and we ensure its consistency via tests.
The test //tools/adt/idea/studio:searchable_options_test
ensures that the bundled xmls are up-to-date. If this test fails, its outputs.zip
file contains the new .xmls that need to be updated.
Alternatively, running
bazel run //tools/adt/idea/studio:update_searchable_options
Will build the studio bundle, and update the source files with the latest index.
In order to build all dependencies with c++ optimized builds, stripped binaries, full zip compression, please use
bazel build //tools/adt/idea/studio:android-studio --config=release
Or our remote configuration which also implies release
bazel build //tools/adt/idea/studio:android-studio --config=remote