Skip to content

Commit 6bece6a

Browse files
committed
Update to 12.0.0_r13; Add user build
1 parent 4332bb4 commit 6bece6a

File tree

3 files changed

+28
-9
lines changed

3 files changed

+28
-9
lines changed

Diff for: ndk/docker-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -eux -o pipefail
33

4-
VERSION='r23' # temporarily before SDK 12 comes out formally
4+
VERSION='r23'
55

66
export USER=$(whoami)
77

Diff for: sdk/build.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/usr/bin/env bash
22
set -eu -o pipefail
33

4+
# Must be run in sdk folder
5+
# Note: you need more than 16GB memory excluding swap, or build will fail.
46
pushd ../base && source ./setup.sh && popd
57

68
container_name="android-rebuilds-sdk"
7-
VERSION='12.0.0_r2'
9+
VERSION='12.0.0_r13'
810

911
docker create --name ${container_name} --workdir /home/build/wd --entrypoint "tail" android-rebuilds:base "-f" "/dev/null"
1012
docker start "${container_name}"
@@ -15,8 +17,10 @@ docker cp docker-build.sh "${container_name}":/home/build/wd/docker-build.sh
1517
docker exec --user build "${container_name}" bash -c "/home/build/wd/docker-build.sh"
1618

1719
# copy output
18-
docker cp "${container_name}":/home/build/wd/out/dist/android-sdk_eng.build_linux-x86.zip android-sdk_eng.${VERSION}_linux-x86.zip
19-
docker cp "${container_name}":/home/build/wd/out/dist/android-sdk_eng.build_windows.zip android-sdk_eng.${VERSION}_windows.zip
20+
docker cp "${container_name}":/home/build/wd/out/dist/android-sdk_user-${VERSION}_linux-x86.zip android-sdk_user-${VERSION}_linux-x86.zip
21+
docker cp "${container_name}":/home/build/wd/out/dist/android-sdk_user-${VERSION}_windows.zip android-sdk_user-${VERSION}_windows.zip
22+
docker cp "${container_name}":/home/build/wd/out/dist/android-sdk_eng-${VERSION}_linux-x86.zip android-sdk_eng-${VERSION}_linux-x86.zip
23+
docker cp "${container_name}":/home/build/wd/out/dist/android-sdk_eng-${VERSION}_windows.zip android-sdk_eng-${VERSION}_windows.zip
2024

2125
# shutdown and remove container
2226
if docker ps --format '{{.Names}}' | grep -w "${container_name}" &> /dev/null; then

Diff for: sdk/docker-build.sh

+20-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/usr/bin/env bash
22
set -eux -o pipefail
33

4-
VERSION='12.0.0_r2' # temporarily before SDK 12 comes out formally
4+
VERSION='12.0.0_r13' # temporarily before SDK 12 comes out formally
55
# https://source.android.com/setup/build/building#choose-a-target
6-
TARGET='eng' # user, userdebug, eng
6+
TARGET_USER='user' # user, userdebug, eng
7+
TARGET_ENG='eng' # user, userdebug, eng
8+
9+
export JAVA_TOOL_OPTIONS="-Xmx8g" # increase Java heap size
710

811
export USER=$(whoami)
9-
export BUILD_NUMBER="${TARGET}-${VERSION}"
1012

1113
# Sync sources
1214
repo init -u https://android.googlesource.com/platform/manifest -b android-$VERSION --depth=1
@@ -16,10 +18,23 @@ repo sync -c -j4
1618
pushd development && git apply ../development.patch && popd
1719

1820
# Build
19-
# build/envsetup.sh cannot be run with -u
21+
22+
# build user
23+
export BUILD_NUMBER="${TARGET_USER}-${VERSION}"
24+
# build/envsetup.sh and lunch cannot be run with -u
2025
set +u
2126
source build/envsetup.sh
22-
lunch sdk_arm64-${TARGET}
27+
lunch sdk_arm64-${TARGET_USER}
28+
set -u
29+
30+
# win_sdk build linux SDK too
31+
#make -j$(nproc) sdk dist sdk_repo
32+
make -j$(nproc) win_sdk dist sdk_repo
33+
34+
# build eng
35+
export BUILD_NUMBER="${TARGET_ENG}-${VERSION}"
36+
set +u
37+
lunch sdk_arm64-${TARGET_ENG}
2338
set -u
2439

2540
# win_sdk build linux SDK too

0 commit comments

Comments
 (0)