Commits:
-
98e9c031
by Pier Angelo Vendrame at 2026-01-26T13:02:25+01:00
Bug 41684: Move gradle setup back to projects/gradle/config.
-
5ea37387
by Pier Angelo Vendrame at 2026-01-26T13:02:28+01:00
Bug 41684: Minor cleanup in project configs.
While working on this issue, I found that there were several minor
changes that we could do to improve consistency with the rest of config
files, therefore I thought of doing them in a separate commit first.
-
88ad5449
by Pier Angelo Vendrame at 2026-01-26T15:00:03+01:00
Bug 41684: Use the NDK as Android compiler.
We used to use a package with the full Android SDK+NDK.
However, we have several projects that only need the NDK.
Passing the SDK to them involved unneeded rebuilds for every SDK change,
and longer iteration times for toolchain update as a consequence.
Projects still needing the Android SDK will need to include both.
22 changed files:
Changes:
projects/android-ndk/README.md
|
|
1
|
+This projects downloads and repacks the Android NDK, which we use as the
|
|
|
2
|
+default compiler for Android.
|
|
|
3
|
+
|
|
|
4
|
+We used to set the `android-toolchain` project as `var/compiler`, but most of
|
|
|
5
|
+the projects only need the NDK, so any error in `android-toolchain` would
|
|
|
6
|
+trigger unneeded rebuilds, making iteration times longer.
|
|
|
7
|
+
|
|
|
8
|
+We keep the NDK version in sync with the version used by Mozilla. |
projects/android-ndk/build
|
|
1
|
+#!/bin/bash
|
|
|
2
|
+[% c("var/set_default_env") -%]
|
|
|
3
|
+
|
|
|
4
|
+unzip -qq $rootdir/[% c("input_files_by_name/ndk")%]
|
|
|
5
|
+mv android-ndk-r[% c("var/release") %] [% project %]
|
|
|
6
|
+[% c('tar', {
|
|
|
7
|
+ tar_src => [ project ],
|
|
|
8
|
+ tar_args => '-caf ' _ dest_dir _ '/' _ c('filename'),
|
|
|
9
|
+ }) %] |
projects/android-ndk/config
|
|
1
|
+# vim: filetype=yaml sw=2
|
|
|
2
|
+filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
|
|
|
3
|
+version: 29.0.14206865
|
|
|
4
|
+
|
|
|
5
|
+var:
|
|
|
6
|
+ release: 29
|
|
|
7
|
+ setup: |
|
|
|
8
|
+ mkdir -p /var/tmp/dist
|
|
|
9
|
+ tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
|
|
|
10
|
+ export ANDROID_NDK_HOME=/var/tmp/dist/android-ndk/
|
|
|
11
|
+ export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME
|
|
|
12
|
+ export NDK_HOST_TAG=linux-x86_64
|
|
|
13
|
+ export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
|
|
|
14
|
+
|
|
|
15
|
+input_files:
|
|
|
16
|
+ - URL: 'https://dl.google.com/android/repository/android-ndk-r[% c("var/release") %]-linux.zip'
|
|
|
17
|
+ name: ndk
|
|
|
18
|
+ sha256sum: 4abbbcdc842f3d4879206e9695d52709603e52dd68d3c1fff04b3b5e7a308ecf |
projects/android-toolchain/README.md
→
projects/android-sdk/README.md
|
1
|
|
-This project is configured as `var/compiler` for Android.
|
|
2
|
|
-
|
|
3
|
|
-It contains a few versions of the Android SDK, build tools and the NDK.
|
|
|
1
|
+This project contains some packages that would normally be installed with
|
|
|
2
|
+`sdkmanager`, such as the build tools, platform tools and platforms.
|
|
4
|
3
|
|
|
5
|
4
|
It defines several environment variables that various build systems look for,
|
|
6
|
5
|
such as `ANDROID_HOME`.
|
|
7
|
|
-Optionally, it also prepares gradle.
|
|
8
|
6
|
|
|
9
|
|
-The output artifact includes only one version of the NDK, because of its huge
|
|
10
|
|
-size, but the setup commands can use a custom version of the NDK, since some
|
|
11
|
|
-projects need different versions (e.g., GeckoView and Application Services).
|
|
|
7
|
+We used to have a single package for the SDK and the NDK.
|
|
|
8
|
+However, most of native binaries need only the NDK.
|
|
|
9
|
+Therefore, we decided to split the project, to possibly reduce the iteration
|
|
|
10
|
+time when updating the toolchains, as it is much easier to get the NDK right at
|
|
|
11
|
+the first attempt.
|
|
12
|
12
|
|
|
13
|
13
|
# Known issues
|
|
14
|
14
|
|
projects/android-toolchain/build
→
projects/android-sdk/build
| ... |
... |
@@ -3,20 +3,13 @@ |
|
3
|
3
|
|
|
4
|
4
|
distdir=$rootdir/[% project %]
|
|
5
|
5
|
mkdir -p $distdir
|
|
6
|
|
-
|
|
7
|
|
-mkdir $distdir/android-sdk-linux
|
|
8
|
|
-cd $distdir/android-sdk-linux
|
|
|
6
|
+cd $distdir
|
|
9
|
7
|
|
|
10
|
8
|
# Command line tools
|
|
11
|
9
|
mkdir -p cmdline-tools
|
|
12
|
10
|
unzip -qq $rootdir/[% c("input_files_by_name/android_commandlinetools") %] -d cmdline-tools
|
|
13
|
11
|
mv cmdline-tools/cmdline-tools cmdline-tools/[% c("var/commandlinetools_version_string") %]
|
|
14
|
12
|
|
|
15
|
|
-# NDK
|
|
16
|
|
-mkdir ndk
|
|
17
|
|
-unzip -qq $rootdir/[% c("input_files_by_name/android_ndk_compiler")%] -d ndk
|
|
18
|
|
-ln -s android-ndk-r[% c("var/android_ndk_release_name") %] ndk/[% c("var/android_ndk_revision") %]
|
|
19
|
|
-
|
|
20
|
13
|
# Build tools
|
|
21
|
14
|
mkdir build-tools
|
|
22
|
15
|
unzip -qq $rootdir/[% c("input_files_by_name/build_tools") %] -d build-tools
|
| ... |
... |
@@ -38,6 +31,11 @@ mv $rootdir/platform-36.1-package.xml platforms/android-36.1/package.xml |
|
38
|
31
|
# Platform tools
|
|
39
|
32
|
unzip -qq $rootdir/[% c("input_files_by_name/platform_tools") %]
|
|
40
|
33
|
|
|
|
34
|
+# Placeholder for the NDK, as some projects expect the NDK to be in
|
|
|
35
|
+# $ANDROID_HOME/ndk/<ndk-version>.
|
|
|
36
|
+# We will add a symlink to the actual NDK in the setup when available.
|
|
|
37
|
+mkdir ndk
|
|
|
38
|
+
|
|
41
|
39
|
# That's a quirk required by GeckoView but let's have it here instead of in the
|
|
42
|
40
|
# project's build script
|
|
43
|
41
|
mkdir emulator
|
projects/android-toolchain/config
→
projects/android-sdk/config
| ... |
... |
@@ -5,33 +5,12 @@ version: 36.1.0 |
|
5
|
5
|
var:
|
|
6
|
6
|
setup: |
|
|
7
|
7
|
mkdir -p /var/tmp/dist
|
|
8
|
|
- tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
|
|
9
|
|
- export ANDROID_HOME=/var/tmp/dist/[% project %]/android-sdk-linux
|
|
|
8
|
+ tar -C /var/tmp/dist -xf $rootdir/[% c("sdk_tarfile") %]
|
|
|
9
|
+ export ANDROID_HOME=/var/tmp/dist/[% project %]
|
|
|
10
|
+ [[ -n "${ANDROID_NDK_HOME}" ]] && ln -s $ANDROID_NDK_HOME $ANDROID_HOME/ndk/[% pc("android-ndk", "version") %]
|
|
10
|
11
|
export PATH=$PATH:$ANDROID_HOME/build-tools/[% c("version") %]
|
|
11
|
|
- # By default we use the old NDK which is the one GeckoView is using.
|
|
12
|
|
- # However, we can overwrite that per project if needed (e.g.
|
|
13
|
|
- # application-services is currently on a newer NDK).
|
|
14
|
|
- # But an NDK is more than 1.5GB, so it does not make sense to copy one that
|
|
15
|
|
- # is not even used in all containers. Instead, we download the additional
|
|
16
|
|
- # NDK only in application-services, and adjust the other variables here.
|
|
17
|
|
- [% IF c("ndk_release") -%]
|
|
18
|
|
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/android-ndk-r[% c("ndk_release") %]
|
|
19
|
|
- [% ELSE -%]
|
|
20
|
|
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/android-ndk-r[% c("var/android_ndk_release_name") %]
|
|
21
|
|
- [% END -%]
|
|
22
|
|
- export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME
|
|
23
|
|
- export NDK_HOST_TAG=linux-x86_64
|
|
24
|
|
- export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
|
|
25
|
|
- [% IF c("gradle_tarfile") -%]
|
|
26
|
|
- tar -C /var/tmp/dist/[% project %] -xf $rootdir/[% c("gradle_tarfile") %]
|
|
27
|
|
- export GRADLE_HOME=/var/tmp/dist/[% project %]/gradle
|
|
28
|
|
- export GRADLE_USER_HOME=$GRADLE_HOME
|
|
29
|
|
- export PATH=$PATH:$GRADLE_HOME/bin
|
|
30
|
|
- [% END -%]
|
|
31
|
12
|
google_repo: https://dl.google.com/android/repository
|
|
32
|
13
|
android_release_dir: android-16
|
|
33
|
|
- android_ndk_release_name: '29'
|
|
34
|
|
- android_ndk_revision: 29.0.14206865
|
|
35
|
14
|
# We need the following two variables for get_build_tools, used by signing
|
|
36
|
15
|
# scripts.
|
|
37
|
16
|
build_tools_version: 36.1
|
| ... |
... |
@@ -45,9 +24,6 @@ input_files: |
|
45
|
24
|
- URL: '[% c("var/google_repo") %]/commandlinetools-linux-[% c("var/commandlinetools_version") %]_latest.zip'
|
|
46
|
25
|
name: android_commandlinetools
|
|
47
|
26
|
sha256sum: 7ec965280a073311c339e571cd5de778b9975026cfcbe79f2b1cdcb1e15317ee
|
|
48
|
|
- - URL: '[% c("var/google_repo") %]/android-ndk-r[% c("var/android_ndk_release_name") %]-linux.zip'
|
|
49
|
|
- name: android_ndk_compiler
|
|
50
|
|
- sha256sum: 4abbbcdc842f3d4879206e9695d52709603e52dd68d3c1fff04b3b5e7a308ecf
|
|
51
|
27
|
- URL: '[% c("var/google_repo") %]/[% c("var/build_tools_filename") %]'
|
|
52
|
28
|
name: build_tools
|
|
53
|
29
|
sha256sum: '[% c("var/build_tools_sha256sum") %]'
|
projects/android-toolchain/platform-36.1-package.xml
→
projects/android-sdk/platform-36.1-package.xml
projects/application-services/build
| ... |
... |
@@ -3,9 +3,10 @@ |
|
3
|
3
|
|
|
4
|
4
|
[% pc(c('var/compiler'), 'var/setup', {
|
|
5
|
5
|
compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')),
|
|
6
|
|
- gradle_tarfile => c("input_files_by_name/gradle"),
|
|
7
|
6
|
}) %]
|
|
8
|
|
-pushd /var/tmp/dist/android-toolchain/android-sdk-linux/build-tools/
|
|
|
7
|
+[% pc('android-sdk', 'var/setup', { sdk_tarfile => c("input_files_by_name/android-sdk") }) %]
|
|
|
8
|
+[% pc('gradle', 'var/setup', { gradle_tarfile => c("input_files_by_name/gradle") }) %]
|
|
|
9
|
+pushd /var/tmp/dist/android-sdk/build-tools/
|
|
9
|
10
|
unzip $rootdir/'[% c("input_files_by_name/build_tools_35") %]'
|
|
10
|
11
|
mv android-15 35.0
|
|
11
|
12
|
popd
|
projects/application-services/config
| ... |
... |
@@ -48,25 +48,20 @@ steps: |
|
48
|
48
|
- gyp
|
|
49
|
49
|
input_files:
|
|
50
|
50
|
- project: container-image
|
|
51
|
|
- pkg_type: build
|
|
52
|
51
|
- project: '[% c("var/compiler") %]'
|
|
53
|
52
|
name: '[% c("var/compiler") %]'
|
|
54
|
|
- pkg_type: build
|
|
|
53
|
+ - project: android-sdk
|
|
|
54
|
+ name: android-sdk
|
|
55
|
55
|
- project: gradle
|
|
56
|
56
|
name: gradle
|
|
57
|
|
- pkg_type: build
|
|
58
|
57
|
- project: rust
|
|
59
|
58
|
name: rust
|
|
60
|
|
- pkg_type: build
|
|
61
|
59
|
- project: ninja
|
|
62
|
60
|
name: ninja
|
|
63
|
|
- pkg_type: build
|
|
64
|
61
|
- project: uniffi-rs
|
|
65
|
62
|
name: uniffi-rs
|
|
66
|
|
- pkg_type: build
|
|
67
|
63
|
- project: glean
|
|
68
|
64
|
name: glean
|
|
69
|
|
- pkg_type: build
|
|
70
|
65
|
enable: '[% !c("var/generate_gradle_dependencies_list") %]'
|
|
71
|
66
|
# Only Application Services currently requires build tools 35.
|
|
72
|
67
|
# So, download them only here, rather than adding them to the shared
|
projects/application-services/list_toolchain_updates_checks
| ... |
... |
@@ -8,7 +8,7 @@ if (m/^\\s*compileSdkVersion:\\s([^"]*),/) { |
|
8
|
8
|
}
|
|
9
|
9
|
EOF
|
|
10
|
10
|
needed=$(cat build.gradle | perl -ne "$p")
|
|
11
|
|
-current='[% pc("android-toolchain", "var/android_api_level") %]'
|
|
|
11
|
+current=$(echo [% pc("android-sdk", "version") %] | cut -f 1 -d '.')
|
|
12
|
12
|
check_update_needed compileSdkVersion "$needed" "$current"
|
|
13
|
13
|
|
|
14
|
14
|
|
projects/browser/build.android
|
1
|
1
|
#!/bin/bash
|
|
2
|
2
|
[% c("var/set_default_env") -%]
|
|
3
|
|
-[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
|
|
|
3
|
+
|
|
|
4
|
+[% pc('android-sdk', 'var/setup', { sdk_tarfile => c("input_files_by_name/android-sdk") }) %]
|
|
4
|
5
|
|
|
5
|
6
|
[% IF c("var/android-x86_64") -%]
|
|
6
|
7
|
tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/node') %]
|
projects/browser/config
| ... |
... |
@@ -69,9 +69,12 @@ targets: |
|
69
|
69
|
|
|
70
|
70
|
input_files:
|
|
71
|
71
|
- project: container-image
|
|
|
72
|
+ - name: '[% c("var/compiler") %]'
|
|
|
73
|
+ project: '[% c("var/compiler") %]'
|
|
|
74
|
+ enable: '[% c("var/macos") %]'
|
|
72
|
75
|
- project: firefox
|
|
73
|
76
|
name: firefox
|
|
74
|
|
- enable: '[% ! c("var/android") %]'
|
|
|
77
|
+ enable: '[% !c("var/android") %]'
|
|
75
|
78
|
- project: firefox
|
|
76
|
79
|
name: firefox-aarch64
|
|
77
|
80
|
enable: '[% c("var/macos_universal") %]'
|
| ... |
... |
@@ -81,30 +84,11 @@ input_files: |
|
81
|
84
|
name: src-firefox
|
|
82
|
85
|
pkg_type: src-tarballs
|
|
83
|
86
|
enable: '[% c("var/macos") %]'
|
|
84
|
|
- - project: geckoview
|
|
85
|
|
- name: fenix
|
|
86
|
|
- pkg_type: build_apk
|
|
87
|
|
- enable: '[% c("var/android") && !c("var/android_single_arch") %]'
|
|
88
|
|
- - project: geckoview
|
|
89
|
|
- name: fenix
|
|
90
|
|
- pkg_type: build
|
|
91
|
|
- enable: '[% c("var/android") && c("var/android_single_arch") %]'
|
|
92
|
|
- - project: tor-expert-bundle
|
|
93
|
|
- name: tor-expert-bundle
|
|
94
|
|
- enable: '[% c("var/tor-browser") %]'
|
|
95
|
|
- - project: tor-expert-bundle
|
|
96
|
|
- name: tor-expert-bundle-aarch64
|
|
97
|
|
- enable: '[% c("var/macos_universal") && c("var/tor-browser") %]'
|
|
98
|
|
- target_replace:
|
|
99
|
|
- '^torbrowser-macos.*': torbrowser-macos-aarch64
|
|
100
|
|
- - project: moat-settings
|
|
101
|
|
- name: moat-settings
|
|
102
|
|
- enable: '[% c("var/tor-browser") %]'
|
|
103
|
87
|
- project: fonts
|
|
104
|
88
|
name: fonts
|
|
105
|
|
- enable: '[% ! c("var/android") %]'
|
|
|
89
|
+ enable: '[% !c("var/android") %]'
|
|
106
|
90
|
- filename: Bundle-Data
|
|
107
|
|
- enable: '[% ! c("var/android") %]'
|
|
|
91
|
+ enable: '[% !c("var/android") %]'
|
|
108
|
92
|
- filename: dmg-root
|
|
109
|
93
|
enable: '[% c("var/macos") %]'
|
|
110
|
94
|
- URL: https://dist.torproject.org/torbrowser/noscript/noscript-13.5.1.90101984.xpi
|
| ... |
... |
@@ -118,6 +102,20 @@ input_files: |
|
118
|
102
|
name: mullvad-extension
|
|
119
|
103
|
sha256sum: 4597ee6fff6a2f19cbf78a6149d38d12ad8a9d6029b7e36f6c639dc3e07dd2c3
|
|
120
|
104
|
enable: '[% c("var/mullvad-browser") %]'
|
|
|
105
|
+ - project: manual
|
|
|
106
|
+ name: manual
|
|
|
107
|
+ enable: '[% !c("var/android") && c("var/tor-browser") %]'
|
|
|
108
|
+ - project: tor-expert-bundle
|
|
|
109
|
+ name: tor-expert-bundle
|
|
|
110
|
+ enable: '[% c("var/tor-browser") %]'
|
|
|
111
|
+ - project: tor-expert-bundle
|
|
|
112
|
+ name: tor-expert-bundle-aarch64
|
|
|
113
|
+ enable: '[% c("var/macos_universal") && c("var/tor-browser") %]'
|
|
|
114
|
+ target_replace:
|
|
|
115
|
+ '^torbrowser-macos.*': torbrowser-macos-aarch64
|
|
|
116
|
+ - project: moat-settings
|
|
|
117
|
+ name: moat-settings
|
|
|
118
|
+ enable: '[% c("var/tor-browser") %]'
|
|
121
|
119
|
- filename: 'gtk3-settings.ini'
|
|
122
|
120
|
enable: '[% c("var/linux") %]'
|
|
123
|
121
|
- project: hfsplus-tools
|
| ... |
... |
@@ -145,15 +143,20 @@ input_files: |
|
145
|
143
|
name: translation-mullvad-browser
|
|
146
|
144
|
pkg_type: mullvad-browser
|
|
147
|
145
|
enable: '[% c("var/mullvad-browser") && c("var/windows") && !c("var/testbuild") %]'
|
|
|
146
|
+ - project: geckoview
|
|
|
147
|
+ name: fenix
|
|
|
148
|
+ pkg_type: build_apk
|
|
|
149
|
+ enable: '[% c("var/android") && !c("var/android_single_arch") %]'
|
|
|
150
|
+ - project: geckoview
|
|
|
151
|
+ name: fenix
|
|
|
152
|
+ pkg_type: build
|
|
|
153
|
+ enable: '[% c("var/android") && c("var/android_single_arch") %]'
|
|
148
|
154
|
# To generate a new keystore, see how-to-generate-keystore.txt
|
|
149
|
155
|
- filename: android-qa.keystore
|
|
150
|
156
|
enable: '[% c("var/android") %]'
|
|
151
|
|
- - name: '[% c("var/compiler") %]'
|
|
152
|
|
- project: '[% c("var/compiler") %]'
|
|
153
|
|
- enable: '[% c("var/android") || c("var/macos") %]'
|
|
154
|
|
- - project: manual
|
|
155
|
|
- name: manual
|
|
156
|
|
- enable: '[% ! c("var/android") && c("var/tor-browser") %]'
|
|
|
157
|
+ - project: android-sdk
|
|
|
158
|
+ name: android-sdk
|
|
|
159
|
+ enable: '[% c("var/android") %]'
|
|
157
|
160
|
# tor-browser-build#40920
|
|
158
|
161
|
- filename: sort-baseline.py
|
|
159
|
162
|
enable: '[% c("var/android") %]'
|
projects/geckoview/build_ac_fenix
| ... |
... |
@@ -12,7 +12,7 @@ gradle $GRADLE_FLAGS assembleGecko -x lint [% IF c('var/generate_gradle_dependen |
|
12
|
12
|
popd
|
|
13
|
13
|
|
|
14
|
14
|
# The build might fail with "file exists" otherwise.
|
|
15
|
|
-rm -rf /var/tmp/dist/android-toolchain/gradle/glean/pythonenv
|
|
|
15
|
+rm -rf $GRADLE_HOME/glean/pythonenv
|
|
16
|
16
|
|
|
17
|
17
|
echo "Building Fenix $(date)"
|
|
18
|
18
|
pushd mobile/android/fenix
|
projects/geckoview/build_common
|
1
|
1
|
[% c("var/set_default_env") -%]
|
|
2
|
2
|
[% pc(c('var/compiler'), 'var/setup', {
|
|
3
|
3
|
compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')),
|
|
4
|
|
- gradle_tarfile => c("input_files_by_name/gradle"),
|
|
5
|
4
|
}) %]
|
|
|
5
|
+[% pc('android-sdk', 'var/setup', { sdk_tarfile => c("input_files_by_name/android-sdk") }) %]
|
|
|
6
|
+[% pc('gradle', 'var/setup', { gradle_tarfile => c("input_files_by_name/gradle") }) %]
|
|
6
|
7
|
distdir=/var/tmp/dist
|
|
7
|
8
|
builddir=/var/tmp/build
|
|
8
|
9
|
outdir="[% dest_dir _ '/' _ c('filename') -%]"
|
projects/geckoview/config
| ... |
... |
@@ -78,6 +78,9 @@ steps: |
|
78
|
78
|
- name: '[% c("var/compiler") %]'
|
|
79
|
79
|
project: '[% c("var/compiler") %]'
|
|
80
|
80
|
pkg_type: build
|
|
|
81
|
+ - project: android-sdk
|
|
|
82
|
+ name: android-sdk
|
|
|
83
|
+ pkg_type: build
|
|
81
|
84
|
- project: gradle
|
|
82
|
85
|
name: gradle
|
|
83
|
86
|
pkg_type: build
|
| ... |
... |
@@ -156,6 +159,8 @@ input_files: |
|
156
|
159
|
refresh_input: 1
|
|
157
|
160
|
- name: '[% c("var/compiler") %]'
|
|
158
|
161
|
project: '[% c("var/compiler") %]'
|
|
|
162
|
+ - project: android-sdk
|
|
|
163
|
+ name: android-sdk
|
|
159
|
164
|
- project: gradle
|
|
160
|
165
|
name: gradle
|
|
161
|
166
|
- project: rust
|
projects/geckoview/list_toolchain_updates_checks
| ... |
... |
@@ -10,7 +10,7 @@ if (m/^\\s*NDK_VERSION\\s*=\\s*"(.+)"/) { |
|
10
|
10
|
}
|
|
11
|
11
|
EOF
|
|
12
|
12
|
needed=$(cat python/mozboot/mozboot/android.py | perl -ne "$p")
|
|
13
|
|
-current='r[% pc("android-toolchain", "var/android_ndk_release_name") %]'
|
|
|
13
|
+current='r[% pc("android-ndk", "var/release") %]'
|
|
14
|
14
|
check_update_needed ndk_release_name "$needed" "$current"
|
|
15
|
15
|
|
|
16
|
16
|
|
| ... |
... |
@@ -22,7 +22,7 @@ if (m/build-tools;(.+)$/) { |
|
22
|
22
|
}
|
|
23
|
23
|
EOF
|
|
24
|
24
|
needed=$(cat python/mozboot/mozboot/android-packages.txt | perl -ne "$p")
|
|
25
|
|
-current='[% pc("android-toolchain", "version") %]'
|
|
|
25
|
+current='[% pc("android-sdk", "version") %]'
|
|
26
|
26
|
check_update_needed build_tools "$needed" "$current"
|
|
27
|
27
|
|
|
28
|
28
|
|
| ... |
... |
@@ -43,7 +43,7 @@ while (<>) { |
|
43
|
43
|
}
|
|
44
|
44
|
EOF
|
|
45
|
45
|
needed=$(cat python/mozboot/mozboot/android.py | perl -e "$p")
|
|
46
|
|
-current='[% pc("android-toolchain", "var/commandlinetools_version_string") %]-[% pc("android-toolchain", "var/commandlinetools_version") %]'
|
|
|
46
|
+current='[% pc("android-sdk", "var/commandlinetools_version_string") %]-[% pc("android-sdk", "var/commandlinetools_version") %]'
|
|
47
|
47
|
check_update_needed cmdline-tools "$needed" "$current"
|
|
48
|
48
|
|
|
49
|
49
|
|
projects/glean/build
| ... |
... |
@@ -3,10 +3,11 @@ |
|
3
|
3
|
|
|
4
|
4
|
[% pc(c('var/compiler'), 'var/setup', {
|
|
5
|
5
|
compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')),
|
|
6
|
|
- gradle_tarfile => c("input_files_by_name/gradle"),
|
|
7
|
6
|
}) %]
|
|
|
7
|
+[% pc('android-sdk', 'var/setup', { sdk_tarfile => c("input_files_by_name/android-sdk") }) %]
|
|
|
8
|
+[% pc('gradle', 'var/setup', { gradle_tarfile => c("input_files_by_name/gradle") }) %]
|
|
8
|
9
|
|
|
9
|
|
-pushd /var/tmp/dist/android-toolchain/android-sdk-linux/
|
|
|
10
|
+pushd /var/tmp/dist/android-sdk
|
|
10
|
11
|
cd build-tools
|
|
11
|
12
|
unzip $rootdir/'[% c("input_files_by_name/build_tools_35") %]'
|
|
12
|
13
|
mv android-15 35.0.0
|
projects/glean/config
| ... |
... |
@@ -23,9 +23,11 @@ steps: |
|
23
|
23
|
- project: container-image
|
|
24
|
24
|
- project: '[% c("var/compiler") %]'
|
|
25
|
25
|
name: '[% c("var/compiler") %]'
|
|
|
26
|
+ - project: android-sdk
|
|
|
27
|
+ name: android-sdk
|
|
26
|
28
|
# These versions of build tools and platform are not the same version needed
|
|
27
|
29
|
# by our other projects, therefore we download it only here instead of modifying
|
|
28
|
|
- # the android-toolchain project.
|
|
|
30
|
+ # the android-sdk project.
|
|
29
|
31
|
- URL: 'https://dl.google.com/android/repository/build-tools_r35_linux.zip'
|
|
30
|
32
|
name: build_tools_35
|
|
31
|
33
|
sha256sum: bd3a4966912eb8b30ed0d00b0cda6b6543b949d5ffe00bea54c04c81e1561d88
|
projects/gradle/config
| ... |
... |
@@ -5,6 +5,11 @@ container: |
|
5
|
5
|
use_container: 1
|
|
6
|
6
|
|
|
7
|
7
|
var:
|
|
|
8
|
+ setup: |
|
|
|
9
|
+ tar -C /var/tmp/dist -xf $rootdir/[% c("gradle_tarfile") %]
|
|
|
10
|
+ export GRADLE_HOME=/var/tmp/dist/gradle
|
|
|
11
|
+ export GRADLE_USER_HOME=$GRADLE_HOME
|
|
|
12
|
+ export PATH=$PATH:$GRADLE_HOME/bin
|
|
8
|
13
|
gradle_sha256sum:
|
|
9
|
14
|
8.14.3: bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
|
|
10
|
15
|
|
projects/oss-licenses-plugin/build
| ... |
... |
@@ -6,8 +6,7 @@ builddir=/var/tmp/build/[% project %]-[% c('version') %]/[% project %] |
|
6
|
6
|
mkdir -p $distdir $builddir
|
|
7
|
7
|
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
|
|
8
|
8
|
|
|
9
|
|
-tar -C /var/tmp/dist -xf [% c('input_files_by_name/gradle') %]
|
|
10
|
|
-export PATH=/var/tmp/dist/gradle/bin:$PATH
|
|
|
9
|
+[% pc('gradle', 'var/setup', { gradle_tarfile => c("input_files_by_name/gradle") }) %]
|
|
11
|
10
|
|
|
12
|
11
|
gradle_repo=/var/tmp/dist/gradle-dependencies
|
|
13
|
12
|
mv $rootdir/[% c('input_files_by_name/gradle-dependencies') %] $gradle_repo
|
rbm.conf
| ... |
... |
@@ -473,7 +473,7 @@ targets: |
|
473
|
473
|
var:
|
|
474
|
474
|
android: 1
|
|
475
|
475
|
platform: android
|
|
476
|
|
- compiler: android-toolchain
|
|
|
476
|
+ compiler: android-ndk
|
|
477
|
477
|
android_min_api: 26
|
|
478
|
478
|
CC: '[% c("var/cross_prefix") %][% c("var/android_min_api") %]-clang'
|
|
479
|
479
|
CFLAGS: '-Oz -fvisibility=hidden'
|
tools/signing/machines-setup/upload-tbb-to-signing-machine
| ... |
... |
@@ -37,9 +37,9 @@ if ! test -f "./out/yubihsm-shell/$yubihsm_filename"; then |
|
37
|
37
|
echo "Fetched $yubihsm_filename"
|
|
38
|
38
|
fi
|
|
39
|
39
|
|
|
40
|
|
-android_build_tools_filename=$(./rbm/rbm showconf --step get_build_tools android-toolchain filename)
|
|
41
|
|
-if ! test -f "./out/android-toolchain/$android_build_tools_filename"; then
|
|
42
|
|
- ./rbm/rbm build --step get_build_tools android-toolchain
|
|
|
40
|
+android_build_tools_filename=$(./rbm/rbm showconf --step get_build_tools android-sdk filename)
|
|
|
41
|
+if ! test -f "./out/android-sdk/$android_build_tools_filename"; then
|
|
|
42
|
+ ./rbm/rbm build --step get_build_tools android-sdk
|
|
43
|
43
|
echo "Fetched $android_build_tools_filename"
|
|
44
|
44
|
fi
|
|
45
|
45
|
|
| ... |
... |
@@ -63,8 +63,8 @@ chmod go+r "./out/yubihsm-shell/$yubihsm_filename" |
|
63
|
63
|
rsync -v "./out/yubihsm-shell/$yubihsm_filename" "$setup_user@$signing_machine:$signing_dir/$yubihsm_filename"
|
|
64
|
64
|
|
|
65
|
65
|
echo "Uploading $android_build_tools_filename"
|
|
66
|
|
-chmod go+r "./out/android-toolchain/$android_build_tools_filename"
|
|
67
|
|
-rsync -v "./out/android-toolchain/$android_build_tools_filename" "$setup_user@$signing_machine:$signing_dir/$android_build_tools_filename"
|
|
|
66
|
+chmod go+r "./out/android-sdk/$android_build_tools_filename"
|
|
|
67
|
+rsync -v "./out/android-sdk/$android_build_tools_filename" "$setup_user@$signing_machine:$signing_dir/$android_build_tools_filename"
|
|
68
|
68
|
echo "Extracting $android_build_tools_filename"
|
|
69
|
69
|
ssh "$setup_user@$signing_machine" mkdir -p $signing_dir/android-build-tools
|
|
70
|
70
|
ssh "$setup_user@$signing_machine" unzip -qo -d $signing_dir/android-build-tools "$signing_dir/$android_build_tools_filename"
|
|