Skip to content

Commit b79993e

Browse files
committed
Minor refactoring for build and added packages for Android 11.
1 parent ec65c4b commit b79993e

File tree

1 file changed

+47
-28
lines changed

1 file changed

+47
-28
lines changed

docker/android-system.sh

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/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`.
26

37
set -x
48
set -euo pipefail
@@ -86,72 +90,81 @@ EOF
8690
python3 ./repo sync -c build/make
8791
fi
8892
python3 ./repo sync -c build/blueprint
89-
if [[ "${major_version}" -ge 7 ]]; then
90-
python3 ./repo sync -c build/soong
91-
fi
9293
python3 ./repo sync -c external/clang
9394
python3 ./repo sync -c external/compiler-rt
9495
python3 ./repo sync -c external/elfutils
95-
if [[ "${major_version}" -ge 10 ]]; then
96-
python3 ./repo sync -c external/golang-protobuf
97-
fi
9896
python3 ./repo sync -c external/jemalloc
99-
if [[ "${major_version}" -ge 10 ]]; then
100-
python3 ./repo sync -c external/jemalloc_new
101-
fi
10297
python3 ./repo sync -c external/libcxx
10398
python3 ./repo sync -c external/libcxxabi
10499
python3 ./repo sync -c external/libunwind
105100
python3 ./repo sync -c external/libunwind_llvm
106101
python3 ./repo sync -c external/llvm
107102
python3 ./repo sync -c external/lzma
108103
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
116104
python3 ./repo sync -c external/zlib
117105
python3 ./repo sync -c frameworks/hardware/interfaces
118106
python3 ./repo sync -c hardware/interfaces
119-
if [[ "${major_version}" -ge 10 ]]; then
120-
python3 ./repo sync -c kernel/configs
121-
fi
122107
python3 ./repo sync -c libnativehelper
123108
python3 ./repo sync -c prebuilts/build-tools
124109
python3 ./repo sync -c prebuilts/clang/host/linux-x86
125110
python3 ./repo sync -c prebuilts/clang-tools
126111
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
130112
python3 ./repo sync -c prebuilts/misc
131113
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
137114
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
138127
if [[ "${major_version}" -ge 8 ]]; then
139128
python3 ./repo sync -c system/libhidl
140129
python3 ./repo sync -c system/tools/hidl
141130
fi
142131
if [[ "${major_version}" -ge 10 ]]; then
132+
python3 ./repo sync -c kernel/configs
143133
python3 ./repo sync -c external/libxml2
144134
python3 ./repo sync -c system/sepolicy
145135
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
146157
fi
147158

148159
case "${arch}" in
149160
arm|arm64)
150-
python3 ./repo sync -c external/arm-optimized-routines
151161
python3 ./repo sync "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-${gcc_version}"
152162
if [[ "${arch}" == "arm64" ]]; then
153163
python3 ./repo sync "prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-${gcc_version}"
154164
fi
165+
if [[ "${major_version}" -ge 10 ]]; then
166+
python3 ./repo sync -c external/arm-optimized-routines
167+
fi
155168
;;
156169
x86)
157170
python3 ./repo sync "prebuilts/gcc/linux-x86/x86/x86_64-linux-android-${gcc_version}"
@@ -170,6 +183,12 @@ EOF
170183
rm bionic/tests/libs/Android.bp
171184
rm bionic/tests/headers/Android.bp
172185
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
173192

174193
sed -i -z -e 's/cc_test {.*}//g' bionic/libc/malloc_debug/Android.bp
175194
sed -i -z -e 's/cc_test {.*}//g' bionic/libc/malloc_hooks/Android.bp

0 commit comments

Comments
 (0)