Jeff Gaston | 7c491f2 | 2019-09-23 13:16:13 -0400 | [diff] [blame] | 1 | # Checking out Metalava |
| 2 | |
Louis Pullen-Freilich | 84625dc | 2022-08-04 13:40:46 +0000 | [diff] [blame] | 3 | Metalava can be downloaded from the `metalava-main` manifest branch via `repo` as explained below |
Jeff Gaston | 7c491f2 | 2019-09-23 13:16:13 -0400 | [diff] [blame] | 4 | |
Louis Pullen-Freilich | 84625dc | 2022-08-04 13:40:46 +0000 | [diff] [blame] | 5 | ## To check out `metalava-main` using `repo`: |
Jeff Gaston | 7c491f2 | 2019-09-23 13:16:13 -0400 | [diff] [blame] | 6 | 1. Install `repo` (Repo is a tool that makes it easier to download multiple Git repositories at once. For more information about Repo, see the [Repo Command Reference](https://source.android.com/setup/develop/repo)) |
| 7 | |
| 8 | ```bash |
| 9 | mkdir ~/bin |
| 10 | PATH=~/bin:$PATH |
| 11 | curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo |
| 12 | chmod a+x ~/bin/repo |
| 13 | ``` |
| 14 | |
| 15 | 2. Configure Git with your real name and email address. |
| 16 | |
| 17 | ```bash |
| 18 | git config --global user.name "Your Name" |
| 19 | git config --global user.email "you@example.com" |
| 20 | ``` |
| 21 | |
| 22 | 3. Create a directory for your checkout (it can be any name) |
| 23 | |
| 24 | ```bash |
Louis Pullen-Freilich | 84625dc | 2022-08-04 13:40:46 +0000 | [diff] [blame] | 25 | mkdir metalava-main |
| 26 | cd metalava-main |
Jeff Gaston | 7c491f2 | 2019-09-23 13:16:13 -0400 | [diff] [blame] | 27 | ``` |
| 28 | |
| 29 | 4. Use `repo` command to initialize the repository. |
| 30 | |
| 31 | ```bash |
Louis Pullen-Freilich | 84625dc | 2022-08-04 13:40:46 +0000 | [diff] [blame] | 32 | repo init -u https://android.googlesource.com/platform/manifest -b metalava-main |
Jeff Gaston | 7c491f2 | 2019-09-23 13:16:13 -0400 | [diff] [blame] | 33 | ``` |
| 34 | |
| 35 | 5. Now your repository is configured to pull only what you need for building and running Metalava. Download the code (this may take some time; the checkout is about 1.7G): |
| 36 | |
| 37 | ```bash |
| 38 | repo sync -j8 -c |
| 39 | ``` |
| 40 | ## Checking out `aosp/master` instead: |
| 41 | |
| 42 | For anyone that is already working in the `aosp/master` branch, you can use that repo checkout instead. For small changes to metalava, this is not recommended - it is a very large checkout, with many dependencies not used by metalava. |
| 43 | |
| 44 | ## Developing |
| 45 | |
| 46 | See also [README.md](README.md) for details about building and running Metalava after you have checked out the code. |
| 47 | |