|
1 | 1 | #!/usr/bin/env bash
|
| 2 | +# The API level details are mentioned here: |
| 3 | +# https://developer.android.com/studio/releases/platforms |
| 4 | +# These are controlled by `ANDROID_VERSION` and `ANDROID_SDK`, |
| 5 | +# for example, `ANDROID_SDK=30` and `ANDROID_VERSION=11.0.0_r48`. |
2 | 6 |
|
3 | 7 | set -x
|
4 | 8 | set -euo pipefail
|
|
86 | 90 | python3 ./repo sync -c build/make
|
87 | 91 | fi
|
88 | 92 | python3 ./repo sync -c build/blueprint
|
89 |
| - if [[ "${major_version}" -ge 7 ]]; then |
90 |
| - python3 ./repo sync -c build/soong |
91 |
| - fi |
92 | 93 | python3 ./repo sync -c external/clang
|
93 | 94 | python3 ./repo sync -c external/compiler-rt
|
94 | 95 | python3 ./repo sync -c external/elfutils
|
95 |
| - if [[ "${major_version}" -ge 10 ]]; then |
96 |
| - python3 ./repo sync -c external/golang-protobuf |
97 |
| - fi |
98 | 96 | python3 ./repo sync -c external/jemalloc
|
99 |
| - if [[ "${major_version}" -ge 10 ]]; then |
100 |
| - python3 ./repo sync -c external/jemalloc_new |
101 |
| - fi |
102 | 97 | python3 ./repo sync -c external/libcxx
|
103 | 98 | python3 ./repo sync -c external/libcxxabi
|
104 | 99 | python3 ./repo sync -c external/libunwind
|
105 | 100 | python3 ./repo sync -c external/libunwind_llvm
|
106 | 101 | python3 ./repo sync -c external/llvm
|
107 | 102 | python3 ./repo sync -c external/lzma
|
108 | 103 | python3 ./repo sync -c external/mksh
|
109 |
| - if [[ "${major_version}" -le 9 ]]; then |
110 |
| - python3 ./repo sync -c external/safe-iop |
111 |
| - python3 ./repo sync -c external/valgrind |
112 |
| - fi |
113 |
| - if [[ "${major_version}" -ge 5 ]]; then |
114 |
| - python3 ./repo sync -c external/vixl |
115 |
| - fi |
116 | 104 | python3 ./repo sync -c external/zlib
|
117 | 105 | python3 ./repo sync -c frameworks/hardware/interfaces
|
118 | 106 | python3 ./repo sync -c hardware/interfaces
|
119 |
| - if [[ "${major_version}" -ge 10 ]]; then |
120 |
| - python3 ./repo sync -c kernel/configs |
121 |
| - fi |
122 | 107 | python3 ./repo sync -c libnativehelper
|
123 | 108 | python3 ./repo sync -c prebuilts/build-tools
|
124 | 109 | python3 ./repo sync -c prebuilts/clang/host/linux-x86
|
125 | 110 | python3 ./repo sync -c prebuilts/clang-tools
|
126 | 111 | python3 ./repo sync -c "prebuilts/gcc/linux-x86/host/x86_64-linux-${glibc_version}"
|
127 |
| - if [[ "${major_version}" -ge 7 ]]; then |
128 |
| - python3 ./repo sync -c prebuilts/go/linux-x86 |
129 |
| - fi |
130 | 112 | python3 ./repo sync -c prebuilts/misc
|
131 | 113 | python3 ./repo sync -c prebuilts/sdk
|
132 |
| - if [[ "${major_version}" -ge 10 ]]; then |
133 |
| - python3 ./repo sync -c external/icu |
134 |
| - python3 ./repo sync -c prebuilts/ndk |
135 |
| - python3 ./repo sync -c prebuilts/vndk/v28 |
136 |
| - fi |
137 | 114 | python3 ./repo sync -c system/core
|
| 115 | + |
| 116 | + if [[ "${major_version}" -le 9 ]]; then |
| 117 | + python3 ./repo sync -c external/safe-iop |
| 118 | + python3 ./repo sync -c external/valgrind |
| 119 | + fi |
| 120 | + if [[ "${major_version}" -ge 5 ]]; then |
| 121 | + python3 ./repo sync -c external/vixl |
| 122 | + fi |
| 123 | + if [[ "${major_version}" -ge 7 ]]; then |
| 124 | + python3 ./repo sync -c prebuilts/go/linux-x86 |
| 125 | + python3 ./repo sync -c build/soong |
| 126 | + fi |
138 | 127 | if [[ "${major_version}" -ge 8 ]]; then
|
139 | 128 | python3 ./repo sync -c system/libhidl
|
140 | 129 | python3 ./repo sync -c system/tools/hidl
|
141 | 130 | fi
|
142 | 131 | if [[ "${major_version}" -ge 10 ]]; then
|
| 132 | + python3 ./repo sync -c kernel/configs |
143 | 133 | python3 ./repo sync -c external/libxml2
|
144 | 134 | python3 ./repo sync -c system/sepolicy
|
145 | 135 | python3 ./repo sync -c system/tools/xsdc
|
| 136 | + python3 ./repo sync -c external/golang-protobuf |
| 137 | + python3 ./repo sync -c external/jemalloc_new |
| 138 | + python3 ./repo sync -c external/icu |
| 139 | + python3 ./repo sync -c prebuilts/ndk |
| 140 | + python3 ./repo sync -c prebuilts/vndk/v28 |
| 141 | + fi |
| 142 | + if [[ "${major_version}" -ge 11 ]]; then |
| 143 | + python3 ./repo sync -c prebuilts/vndk/v29 |
| 144 | + python3 ./repo sync -c system/hardware/interfaces |
| 145 | + python3 ./repo sync -c system/tools/aidl |
| 146 | + python3 ./repo sync -c system/libvintf |
| 147 | + python3 ./repo sync -c tools/metalava |
| 148 | + python3 ./repo sync -c libcore |
| 149 | + python3 ./repo sync -c bootable/recovery |
| 150 | + python3 ./repo sync -c system/apex |
| 151 | + python3 ./repo sync -c external/avb |
| 152 | + python3 ./repo sync -c external/e2fsprogs |
| 153 | + python3 ./repo sync -c external/selinux |
| 154 | + python3 ./repo sync -c external/conscrypt |
| 155 | + python3 ./repo sync -c external/sqlite |
| 156 | + python3 ./repo sync -c prebuilts/python/linux-x86/2.7.5 |
146 | 157 | fi
|
147 | 158 |
|
148 | 159 | case "${arch}" in
|
149 | 160 | arm|arm64)
|
150 |
| - python3 ./repo sync -c external/arm-optimized-routines |
151 | 161 | python3 ./repo sync "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-${gcc_version}"
|
152 | 162 | if [[ "${arch}" == "arm64" ]]; then
|
153 | 163 | python3 ./repo sync "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-${gcc_version}"
|
154 | 164 | fi
|
| 165 | + if [[ "${major_version}" -ge 10 ]]; then |
| 166 | + python3 ./repo sync -c external/arm-optimized-routines |
| 167 | + fi |
155 | 168 | ;;
|
156 | 169 | x86)
|
157 | 170 | python3 ./repo sync "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-${gcc_version}"
|
|
170 | 183 | rm bionic/tests/libs/Android.bp
|
171 | 184 | rm bionic/tests/headers/Android.bp
|
172 | 185 | rm bionic/tests/headers/posix/Android.bp
|
| 186 | + if [[ "${major_version}" -ge 11 ]]; then |
| 187 | + rm system/libvintf/xsd/halManifest/vts/Android.bp |
| 188 | + rm system/libvintf/xsd/halManifest/vts/Android.mk |
| 189 | + rm system/libvintf/xsd/compatibilityMatrix/vts/Android.bp |
| 190 | + rm system/libvintf/xsd/compatibilityMatrix/vts/Android.mk |
| 191 | + fi |
173 | 192 |
|
174 | 193 | sed -i -z -e 's/cc_test {.*}//g' bionic/libc/malloc_debug/Android.bp
|
175 | 194 | sed -i -z -e 's/cc_test {.*}//g' bionic/libc/malloc_hooks/Android.bp
|
|
0 commit comments