xref: /aosp_15_r20/external/skia/site/docs/user/download.md (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1*c8dee2aaSAndroid Build Coastguard Worker---
2*c8dee2aaSAndroid Build Coastguard Workertitle: 'How to download Skia'
3*c8dee2aaSAndroid Build Coastguard WorkerlinkTitle: 'Download'
4*c8dee2aaSAndroid Build Coastguard Worker
5*c8dee2aaSAndroid Build Coastguard Workerweight: 10
6*c8dee2aaSAndroid Build Coastguard Workermenu:
7*c8dee2aaSAndroid Build Coastguard Worker  main:
8*c8dee2aaSAndroid Build Coastguard Worker    weight: 50
9*c8dee2aaSAndroid Build Coastguard Worker---
10*c8dee2aaSAndroid Build Coastguard Worker
11*c8dee2aaSAndroid Build Coastguard Worker## Install `depot_tools` and Git
12*c8dee2aaSAndroid Build Coastguard Worker
13*c8dee2aaSAndroid Build Coastguard WorkerFollow the instructions on [Installing Chromium's
14*c8dee2aaSAndroid Build Coastguard Workerdepot_tools](http://www.chromium.org/developers/how-tos/install-depot-tools)
15*c8dee2aaSAndroid Build Coastguard Workerto download `depot_tools` (which includes gclient, git-cl, and Ninja).
16*c8dee2aaSAndroid Build Coastguard WorkerBelow is a summary of the necessary steps.
17*c8dee2aaSAndroid Build Coastguard Worker
18*c8dee2aaSAndroid Build Coastguard Worker<!--?prettify lang=sh?-->
19*c8dee2aaSAndroid Build Coastguard Worker
20*c8dee2aaSAndroid Build Coastguard Worker    git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
21*c8dee2aaSAndroid Build Coastguard Worker    export PATH="${PWD}/depot_tools:${PATH}"
22*c8dee2aaSAndroid Build Coastguard Worker
23*c8dee2aaSAndroid Build Coastguard Worker`depot_tools` will also install Git on your system, if it wasn't installed
24*c8dee2aaSAndroid Build Coastguard Workeralready.
25*c8dee2aaSAndroid Build Coastguard Worker
26*c8dee2aaSAndroid Build Coastguard Worker### Install `bazelisk`
27*c8dee2aaSAndroid Build Coastguard WorkerIf you intend to add or remove files, or change #includes, you will need to use Bazel to
28*c8dee2aaSAndroid Build Coastguard Workerregenerate parts of the BUILD.bazel files. Instead of installing Bazel manually, we recommend
29*c8dee2aaSAndroid Build Coastguard Workeryou install [Bazelisk](https://github.com/bazelbuild/bazelisk#installation), which will fetch the
30*c8dee2aaSAndroid Build Coastguard Workerappropriate version of [Bazel](https://bazel.build/) for you (as specified by //.bazelversion).
31*c8dee2aaSAndroid Build Coastguard Worker
32*c8dee2aaSAndroid Build Coastguard Worker### Install `ninja`
33*c8dee2aaSAndroid Build Coastguard WorkerNinja can be supplied using `gclient` or with `bin/fetch-ninja`.
34*c8dee2aaSAndroid Build Coastguard Worker
35*c8dee2aaSAndroid Build Coastguard Worker## Clone the Skia repository
36*c8dee2aaSAndroid Build Coastguard Worker
37*c8dee2aaSAndroid Build Coastguard WorkerSkia can either be cloned using `git` or the `fetch` tool that is
38*c8dee2aaSAndroid Build Coastguard Workerinstalled with `depot_tools`.
39*c8dee2aaSAndroid Build Coastguard Worker
40*c8dee2aaSAndroid Build Coastguard Worker<!--?prettify lang=sh?-->
41*c8dee2aaSAndroid Build Coastguard Worker
42*c8dee2aaSAndroid Build Coastguard Worker    git clone https://skia.googlesource.com/skia.git
43*c8dee2aaSAndroid Build Coastguard Worker    # or
44*c8dee2aaSAndroid Build Coastguard Worker    # fetch skia
45*c8dee2aaSAndroid Build Coastguard Worker    cd skia
46*c8dee2aaSAndroid Build Coastguard Worker    python3 tools/git-sync-deps
47*c8dee2aaSAndroid Build Coastguard Worker    python3 bin/fetch-ninja
48*c8dee2aaSAndroid Build Coastguard Worker
49*c8dee2aaSAndroid Build Coastguard Worker## Getting started with Skia
50*c8dee2aaSAndroid Build Coastguard Worker
51*c8dee2aaSAndroid Build Coastguard WorkerYou will probably now want to [build](../build) Skia.
52*c8dee2aaSAndroid Build Coastguard Worker
53*c8dee2aaSAndroid Build Coastguard Worker## Changing and contributing to Skia
54*c8dee2aaSAndroid Build Coastguard Worker
55*c8dee2aaSAndroid Build Coastguard WorkerAt this point, you have everything you need to build and use Skia! If
56*c8dee2aaSAndroid Build Coastguard Workeryou want to make changes, and possibly contribute them back to the Skia
57*c8dee2aaSAndroid Build Coastguard Workerproject, read [How To Submit a Patch](/docs/dev/contrib/submit/).
58