[tbb-commits] [tor-browser-build/master] Bug 40162: Build Fenix instrumented tests apk
sysrqb at torproject.org
sysrqb at torproject.org
Mon Jan 11 21:20:10 UTC 2021
commit 7b8f7afa6a079618f6aac691ae002c00ec847c61
Author: Alex Catarineu <acat at torproject.org>
Date: Fri Dec 11 23:13:12 2020 +0100
Bug 40162: Build Fenix instrumented tests apk
---
projects/fenix/build | 9 +++++----
projects/fenix/config | 2 +-
projects/fenix/gradle-dependencies-list.txt | 2 ++
projects/tor-browser/build.android | 4 ++++
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/projects/fenix/build b/projects/fenix/build
index f1536f1..c91dce3 100644
--- a/projects/fenix/build
+++ b/projects/fenix/build
@@ -37,8 +37,10 @@ cd $builddir-[% c("version") %]
cp $rootdir/[% c('input_files_by_name/topl') %]/* app/
cp $rootdir/[% c('input_files_by_name/tor-android-service') %]/* app/
+# XXX We need the build variant in lower case. Do something smarter here.
+v=[% c("variant") %]
[% IF c("var/fetch_gradle_dependencies") %]
- $GRADLE_HOME/gradle-6.5.1/bin/gradle --debug --no-daemon app:assemble[% c('variant') %] -x lint
+ $GRADLE_HOME/gradle-6.5.1/bin/gradle --debug --no-daemon app:assemble[% c('variant') %] app:assembleAndroidTest -x lint -PtestBuildType=${v,}
[% ELSE %]
# Add our localized strings
[% FOREACH lang = c('var/locales_mobile');
@@ -63,10 +65,9 @@ cp $rootdir/[% c('input_files_by_name/tor-android-service') %]/* app/
fi
version_name='[% c("var/torbrowser_version") %] ([% c("var/fenix_version") %]-[% c("variant") %])'
- $GRADLE_HOME/gradle-6.5.1/bin/gradle --offline --no-daemon -PversionName="$version_name" -Dmaven.repo.local=$gradle_repo app:assemble[% c('variant') %] -x lint
- # XXX We need the build variant in lower case. Do something smarter here.
- v=[% c("variant") %]
+ $GRADLE_HOME/gradle-6.5.1/bin/gradle --offline --no-daemon -PversionName="$version_name" -Dmaven.repo.local=$gradle_repo app:assemble[% c('variant') %] app:assembleAndroidTest -x lint -PtestBuildType=${v,}
cp app/build/outputs/apk/${v,}/*.apk $distdir/[% project %]
+ cp app/build/outputs/apk/androidTest/${v,}/app-${v,}-androidTest.apk $distdir/[% project %]
cd $distdir
[% c('tar', {
diff --git a/projects/fenix/config b/projects/fenix/config
index 592972b..cb2bafc 100644
--- a/projects/fenix/config
+++ b/projects/fenix/config
@@ -14,7 +14,7 @@ var:
container:
use_container: 1
# This should be updated when the list of gradle dependencies is changed.
- gradle_dependencies_version: 14
+ gradle_dependencies_version: 15
# Switch to make it easier to grab all dependencies during a dry-run.
# Note: Use the commit that integrates Tor.
fetch_gradle_dependencies: 0
diff --git a/projects/fenix/gradle-dependencies-list.txt b/projects/fenix/gradle-dependencies-list.txt
index e056e9a..fbd0718 100644
--- a/projects/fenix/gradle-dependencies-list.txt
+++ b/projects/fenix/gradle-dependencies-list.txt
@@ -461,6 +461,8 @@ dbc2bb04ecb002b9f4046263ccad996f4a3d3c59a0cc98837e300a6700571f7c | https://jcent
4f8992dde784509e80917cabbc8406a7137e5f2ba2c1ae5b7250fc182a45bd88 | https://jcenter.bintray.com/com/squareup/okhttp3/okhttp/4.9.0/okhttp-4.9.0.pom
e58c97406a6bb1138893750299ac63c6aa04b38b6b49eae1bfcad1a63ef9ba1b | https://jcenter.bintray.com/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar
fd621988f7f6957025735dc6dd090b00a20f3a3bb8d77ca79036077f629b140b | https://jcenter.bintray.com/com/squareup/okio/okio/2.2.2/okio-2.2.2.pom
+4496b06e73982fcdd8a5393f46e5df2ce2fa4465df5895454cac68a32f09bbc8 | https://jcenter.bintray.com/com/squareup/okio/okio/2.8.0/okio-2.8.0.jar
+26214068fd4c7f437ac8fe8576802a9a9dc151c457582807ad9af2af2e8c9481 | https://jcenter.bintray.com/com/squareup/okio/okio/2.8.0/okio-2.8.0.pom
1d8518e3ac7532a104e4f7be77def37c982e530723c6bdb3d67708cce2b0c2c4 | https://jcenter.bintray.com/com/sun/activation/all/1.2.0/all-1.2.0.pom
993302b16cd7056f21e779cc577d175a810bb4900ef73cd8fbf2b50f928ba9ce | https://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.jar
f879b6e945854c6900b0dbee1c8384d7ab3de7e157fd7ac84937405c416d2a5e | https://jcenter.bintray.com/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom
diff --git a/projects/tor-browser/build.android b/projects/tor-browser/build.android
index 71b9d36..e9354bd 100644
--- a/projects/tor-browser/build.android
+++ b/projects/tor-browser/build.android
@@ -4,6 +4,8 @@ assets_dir=assets
ext_dir=$assets_dir/extensions
qa_apk=[% dest_dir %]/[% c('filename') %]/tor-browser-[% c("version") %]-[% c("var/osname") %]-multi-qa.apk
apk=$rootdir/fenix/app-[% c("var/abi") %]-*.apk
+test_out_apk=[% dest_dir %]/[% c('filename') %]/tor-browser-[% c("version") %]-[% c("var/osname") %]-androidTest.apk
+test_in_apk=$rootdir/fenix/app-*-androidTest.apk
tar xavf $rootdir/[% c('input_files_by_name/fenix') %]
@@ -32,3 +34,5 @@ mv $rootdir/allowed_addons.json $assets_dir/allowed_addons.json
# Sign a QA build. This .apk is not a debug version and doesn't contain a debug
# flag in the manifest.
java -jar /usr/lib/android-sdk/build-tools/debian/apksigner.jar sign --verbose --min-sdk-version [% c("var/android_min_api") %] --ks $rootdir/android-qa.keystore --out $qa_apk --in $apk --ks-key-alias androidqakey --key-pass pass:android --ks-pass pass:android
+
+java -jar /usr/lib/android-sdk/build-tools/debian/apksigner.jar sign --verbose --min-sdk-version [% c("var/android_min_api") %] --ks $rootdir/android-qa.keystore --out $test_out_apk --in $test_in_apk --ks-key-alias androidqakey --key-pass pass:android --ks-pass pass:android
More information about the tbb-commits
mailing list