[tbb-commits] [tor-browser-build/maint-11.0] Bug 40398: Jetify tor-android-service packages

sysrqb at torproject.org sysrqb at torproject.org
Thu Feb 3 17:10:02 UTC 2022


commit 2c124ab22649b0fe26c1647ad97b8d2b9a179ed4
Author: Matthew Finkel <sysrqb at torproject.org>
Date:   Fri Dec 10 17:17:21 2021 +0000

    Bug 40398: Jetify tor-android-service packages
---
 projects/tor-android-service/build  | 8 ++++++--
 projects/tor-android-service/config | 4 ++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/projects/tor-android-service/build b/projects/tor-android-service/build
index 797d5c2..cee92c2 100644
--- a/projects/tor-android-service/build
+++ b/projects/tor-android-service/build
@@ -12,6 +12,7 @@ mkdir -p /var/tmp/build $output_dir
 [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
 tar -C $GRADLE_HOME -xf $rootdir/[% c('input_files_by_name/gradle') %]
 tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
+unzip -d $rootdir $rootdir/[% c('input_files_by_name/jetifier') %]
 
 cd /var/tmp/build/[% project %]-[% c('version') %]
 # Replace pre-packaged tor library with the latest build
@@ -27,5 +28,8 @@ cp $rootdir/[% c('input_files_by_name/topl') %]/*{.aar,.jar} service/libs/
 # Build Android Libraries and Apps
 gradle --offline --no-daemon -P androidplugin=3.6.0 -P appcompatVersion=28.0.0 -P compileVersion=29 -P targetVersion=29 -P minVersion=16 -Dmaven.repo.local=$gradle_repo assembleRelease -x lint
 
-# Package
-cp jsocksAndroid/build/outputs/aar/* service/build/outputs/aar/* $output_dir
+# Bug 40398: Manually jetify each archive and save it in $output_dir
+for aar in jsocksAndroid/build/outputs/aar/* service/build/outputs/aar/*; do
+  fn=`basename $aar`
+  $rootdir/jetifier-standalone/bin/jetifier-standalone -l info -i $aar -o $output_dir/$fn
+done
diff --git a/projects/tor-android-service/config b/projects/tor-android-service/config
index c1ccb7d..fd92cc7 100644
--- a/projects/tor-android-service/config
+++ b/projects/tor-android-service/config
@@ -8,6 +8,7 @@ git_submodule: 1
 var:
   deps:
     - build-essential
+    - unzip
   container:
     use_container: 1
   # this should be updated when the list of gradle dependencies is changed
@@ -41,3 +42,6 @@ input_files:
     name: tor-x86_64
     target_prepend:
       - android-x86_64
+  - URL: 'https://dl.google.com/dl/android/studio/jetifier-zips/1.0.0-beta10/jetifier-standalone.zip'
+    name: jetifier
+    sha256sum: 38186db9c9d1b745890b3d35c0667da1cac146ceb3c26aae5bf0802119472c1b





More information about the tbb-commits mailing list