1*115816f9SAndroid Build Coastguard Worker# Checking out Metalava 2*115816f9SAndroid Build Coastguard Worker 3*115816f9SAndroid Build Coastguard WorkerMetalava can be downloaded from the `metalava-main` manifest branch via `repo` as explained below 4*115816f9SAndroid Build Coastguard Worker 5*115816f9SAndroid Build Coastguard Worker## To check out `metalava-main` using `repo`: 6*115816f9SAndroid Build Coastguard Worker1. 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*115816f9SAndroid Build Coastguard Worker 8*115816f9SAndroid Build Coastguard Worker```bash 9*115816f9SAndroid Build Coastguard Workermkdir ~/bin 10*115816f9SAndroid Build Coastguard WorkerPATH=~/bin:$PATH 11*115816f9SAndroid Build Coastguard Workercurl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo 12*115816f9SAndroid Build Coastguard Workerchmod a+x ~/bin/repo 13*115816f9SAndroid Build Coastguard Worker``` 14*115816f9SAndroid Build Coastguard Worker 15*115816f9SAndroid Build Coastguard Worker2. Configure Git with your real name and email address. 16*115816f9SAndroid Build Coastguard Worker 17*115816f9SAndroid Build Coastguard Worker```bash 18*115816f9SAndroid Build Coastguard Workergit config --global user.name "Your Name" 19*115816f9SAndroid Build Coastguard Workergit config --global user.email "[email protected]" 20*115816f9SAndroid Build Coastguard Worker``` 21*115816f9SAndroid Build Coastguard Worker 22*115816f9SAndroid Build Coastguard Worker3. Create a directory for your checkout (it can be any name) 23*115816f9SAndroid Build Coastguard Worker 24*115816f9SAndroid Build Coastguard Worker```bash 25*115816f9SAndroid Build Coastguard Workermkdir metalava-main 26*115816f9SAndroid Build Coastguard Workercd metalava-main 27*115816f9SAndroid Build Coastguard Worker``` 28*115816f9SAndroid Build Coastguard Worker 29*115816f9SAndroid Build Coastguard Worker4. Use `repo` command to initialize the repository. 30*115816f9SAndroid Build Coastguard Worker 31*115816f9SAndroid Build Coastguard Worker```bash 32*115816f9SAndroid Build Coastguard Workerrepo init -u https://android.googlesource.com/platform/manifest -b metalava-main 33*115816f9SAndroid Build Coastguard Worker``` 34*115816f9SAndroid Build Coastguard Worker 35*115816f9SAndroid Build Coastguard Worker5. 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*115816f9SAndroid Build Coastguard Worker 37*115816f9SAndroid Build Coastguard Worker```bash 38*115816f9SAndroid Build Coastguard Workerrepo sync -j8 -c 39*115816f9SAndroid Build Coastguard Worker``` 40*115816f9SAndroid Build Coastguard Worker## Checking out `aosp/master` instead: 41*115816f9SAndroid Build Coastguard Worker 42*115816f9SAndroid Build Coastguard WorkerFor 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*115816f9SAndroid Build Coastguard Worker 44*115816f9SAndroid Build Coastguard Worker## Developing 45*115816f9SAndroid Build Coastguard Worker 46*115816f9SAndroid Build Coastguard WorkerSee also [README.md](README.md) for details about building and running Metalava after you have checked out the code. 47*115816f9SAndroid Build Coastguard Worker 48