[tor-commits] [tor-browser-build/master] Bug 29575: Configure Firefox Project to Use New TOPL Dependencies

gk at torproject.org gk at torproject.org
Fri Apr 12 08:31:04 UTC 2019


commit e0c5b567242d1bbfaab5a7aaa8e1b76c992cceb2
Author: sisbell <shane.isbell at gmail.com>
Date:   Sun Mar 10 01:34:37 2019 -0800

    Bug 29575: Configure Firefox Project to Use New TOPL Dependencies
---
 projects/firefox/android-dependencies.patch   | 30 +++++++++++++++++++++++++++
 projects/firefox/build                        |  8 ++++---
 projects/firefox/config                       | 10 ++++++++-
 projects/firefox/gradle-dependencies-list.txt | 10 +++++++--
 projects/tor-browser/build.android            | 10 +++++----
 5 files changed, 58 insertions(+), 10 deletions(-)

diff --git a/projects/firefox/android-dependencies.patch b/projects/firefox/android-dependencies.patch
new file mode 100644
index 0000000..429bf8d
--- /dev/null
+++ b/projects/firefox/android-dependencies.patch
@@ -0,0 +1,30 @@
+diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle
+index c8380042d8a9..990fabe05a60 100644
+--- a/mobile/android/app/build.gradle
++++ b/mobile/android/app/build.gradle
+@@ -225,8 +225,10 @@ dependencies {
+     implementation "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+     implementation "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+     implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+-    implementation files('orbotservice-release.aar')
++    implementation files('android-release.aar')
++    implementation files('universal-0.0.3.jar')
+     implementation files('jsocksAndroid-release.aar')
++    implementation files('service-release.aar')
+ 
+     if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
+         implementation "com.android.support:mediarouter-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+@@ -265,9 +267,10 @@ dependencies {
+     // Including the Robotium JAR directly can cause issues with dexing.
+     androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.5.4'
+ 
+-    // Orbotservice
+-    implementation 'org.torproject:tor-android-binary:0.3.4.9'
+-    implementation 'com.jrummyapps:android-shell:1.0.1'
++    //tor-android-service
++    implementation 'net.freehaven.tor.control:jtorctl:0.2'
++    implementation 'org.slf4j:slf4j-api:1.7.25'
++    implementation 'org.slf4j:slf4j-android:1.7.25'
+ }
+ 
+ // TODO: (bug 1261486): This impl is not robust -
diff --git a/projects/firefox/build b/projects/firefox/build
index 9719c23..c070770 100644
--- a/projects/firefox/build
+++ b/projects/firefox/build
@@ -103,11 +103,13 @@ mv -f $rootdir/[% c('input_files_by_name/mozconfig') %] .mozconfig
   # Move Gradle Repo to hard-coded location. This location is embedded in the file
   # chrome/toolkit/content/global/buildconfig.html so needs to be standard for reproducibility
   mv $rootdir/[% c('input_files_by_name/gradle-dependencies') %] $gradle_repo
-  # The download script assumes the artifact package name is the complete URL path.
-  # In some cases this is incorrect, so copy those artifacts to the correct location
-  cp -r $gradle_repo/guardianproject/gpmaven/master/* $gradle_repo
   # Move orbot files so they will be included in the apk during the build
   cp $rootdir/[% c('input_files_by_name/orbot') %]/* mobile/android/app
+  cp $rootdir/[% c('input_files_by_name/topl') %]/* mobile/android/app
+  cp $rootdir/[% c('input_files_by_name/tor-android-service') %]/* mobile/android/app
+  # Apply patches
+  patch -p1 < $rootdir/android-dependencies.patch
+
   # Prepare building the multi-locale .apk including our own strings
   mkdir -p /var/tmp/dist/locales
   tar -C /var/tmp/dist/locales -xf $rootdir/[% c('input_files_by_name/firefox-locale-bundle') %]
diff --git a/projects/firefox/config b/projects/firefox/config
index 8cc3a2f..61d4dbd 100644
--- a/projects/firefox/config
+++ b/projects/firefox/config
@@ -24,7 +24,7 @@ var:
   container:
     use_container: 1
   # this should be updated when the list of gradle dependencies is changed
-  gradle_dependencies_version: 3
+  gradle_dependencies_version: 4
   # used by projects/firefox-locale-bundle
   l10n-changesets.json: '[% exec("cat mobile/locales/l10n-changesets.json") %]'
 
@@ -163,6 +163,14 @@ input_files:
   - project: orbot
     name: orbot
     enable: '[% c("var/android") %]'
+  - project: tor-android-service
+    name: tor-android-service
+    enable: '[% c("var/android") %]'
+  - project: tor-onion-proxy-library
+    name: topl
+    enable: '[% c("var/android") %]'
+  - filename: android-dependencies.patch
+    enable: '[% c("var/android") %]'
   - project: firefox-locale-bundle
     name: firefox-locale-bundle
     enable: '[% c("var/android") %]'
diff --git a/projects/firefox/gradle-dependencies-list.txt b/projects/firefox/gradle-dependencies-list.txt
index 46f12c8..627c438 100644
--- a/projects/firefox/gradle-dependencies-list.txt
+++ b/projects/firefox/gradle-dependencies-list.txt
@@ -7,14 +7,12 @@ cd6db17a11a31ede794ccbd1df0e4d9750f640234731f21cff885a9997277e81 | https://jcent
 d46777ad3ea8bca73491b2e02fc85b3664486abf5314cc4dc6740908bd855330 | https://jcenter.bintray.com/com/google/android/apps/common/testing/accessibility/framework/accessibility-test-framework/2.1/accessibility-test-framework-2.1.pom
 ee041b3beb682e8bbf2dc16b6edc233483cbc36bde27fd13996617a667b615a5 | https://maven.google.com/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.pom
 536c45e8804de01321c478cfb994377f81f1e32897636616fa21b877fd137c6f | https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.pom
-32c797717189ffd0dcc2fcb2e804ab5a0d0c8dfa78b2aa78037f61d4a572f62c | https://raw.githubusercontent.com/guardianproject/gpmaven/master/org/torproject/tor-android-binary/0.3.4.9/tor-android-binary-0.3.4.9.pom
 2ec779741f72313fc6623d0f0e42b2450dd2425dd6ad319697e658aae9ae177b | https://maven.google.com/com/android/tools/dvlib/26.0.1/dvlib-26.0.1.pom
 8d4006178fedef4255797b806167cf4a6774158eedabf96420693afbbd00fee3 | https://maven.google.com/com/android/tools/analytics-library/protos/26.0.1/protos-26.0.1.pom
 c3fb02564ca173e45548d7a91aca1efe341db11da2656199d559773e7ae15edf | https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.1/asm-commons-5.0.1.pom
 ff513db0361fd41237bef4784968bc15aae478d4ec0a9496f811072ccaf3841d | https://jcenter.bintray.com/org/apache/apache/13/apache-13.pom
 8b870b3f2ee38bf15681acbc8b628df1ccf7c533190b5c79af9934b6cd66d451 | https://maven.google.com/com/android/databinding/baseLibrary/3.0.1/baseLibrary-3.0.1.pom
 c0de2bbc4cb8297419659813ecd4ed1d077ed1dd5c1f5544cc5143e493e84c10 | https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.1/asm-tree-5.1.jar
-f09330e83f0e3a3f6648ee43a6814ee3a91df699adf7446d6f1f38e95e34cd88 | https://raw.githubusercontent.com/guardianproject/gpmaven/master/org/torproject/tor-android-binary/0.3.4.9/tor-android-binary-0.3.4.9.aar
 8c6191e0dd8bfdc862332cb79b08185ac5b63565d405dac2605be4c2b19774bd | https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.pom
 8b0aa8a74e990ca8d633ab7bd1938530e921548df13fd4020224a61065378876 | https://maven.google.com/com/android/tools/build/builder-test-api/3.0.1/builder-test-api-3.0.1.pom
 363cc83767b760d7a564d5301e09467e6d48fc1c1c1664b1e18c50815ce19076 | https://jcenter.bintray.com/com/google/guava/guava/20.0/guava-20.0.pom
@@ -366,3 +364,11 @@ e767a1248adb4843110457e839e504c2511649ee78f05a6a311ea7f23578894d | https://maven
 cf5c43860b53ba5a95c19bc6525cc43d3488a6fe3df2f649c0099a613a0640e3 | https://jcenter.bintray.com/com/google/code/gson/gson-parent/2.8.2/gson-parent-2.8.2.pom
 9619e68f7eb36da3a28a60315f34320972badbad43749cc66712bb95b96a4ef3 | https://maven.google.com/com/android/support/support-annotations/23.4.0/support-annotations-23.4.0.pom
 bcb7ce66a9c629fa7c723a767b6430e1a383e8d4dd543d603dcb0ad1b855b8b2 | https://maven.google.com/com/android/support/animated-vector-drawable/23.4.0/animated-vector-drawable-23.4.0.aar
+3369726ca2b0e3736c741ff3c22e06f707a1007ff20ccc5b5ba5d0d9a01ead30 | https://jcenter.bintray.com/net/freehaven/tor/control/jtorctl/0.2/jtorctl-0.2.pom
+18c4a0095d5c1da6b817592e767bb23d29dd2f560ad74df75ff3961dbde25b79 | https://jcenter.bintray.com/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar
+fbd7b254e02d8aef60c418a5f0e14a783b38a16162caffb2d2a16ccd5d2c09b4 | https://jcenter.bintray.com/org/slf4j/slf4j-android/1.7.25/slf4j-android-1.7.25.jar
+ec3a75bebddbf19ff56a281cf5d1ad146169dcaa0e69d7b14f4aaba2e7775f34 | https://jcenter.bintray.com/net/freehaven/tor/control/jtorctl/0.2/jtorctl-0.2.jar
+bd9b9cb1a3987b1427f7a18babe7f92078e32bbe2e1dca6dced00cc0e3a077a9 | https://jcenter.bintray.com/org/slf4j/slf4j-android/1.7.25/slf4j-android-1.7.25.pom
+7cd9d7a0b5d93dfd461a148891b43509cf403a9c7f9fb49060d3554df1c81e1e | https://jcenter.bintray.com/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.pom
+18f5c52120db036e88d6136f8839c832d074bdda95c756c6f429249d2db54ac6 | https://jcenter.bintray.com/org/slf4j/slf4j-parent/1.7.25/slf4j-parent-1.7.25.pom
+
diff --git a/projects/tor-browser/build.android b/projects/tor-browser/build.android
index ffaf93d..7592c6b 100644
--- a/projects/tor-browser/build.android
+++ b/projects/tor-browser/build.android
@@ -13,16 +13,18 @@ mv $rootdir/[% c('input_files_by_name/noscript') %] $ext_dir/{73a6fe31-595d-460b
 
 zip -d $apk META-INF/\*
 zip -r -X $apk $ext_dir
-
-zip -d $apk lib/armeabi/tor.so
+unzip $apk lib/*
+zip -d $apk lib/\*
 
 [% IF c("var/android-x86") %]
-    zip -d $apk lib/armeabi-v7a/tor.so
+    zip $apk lib/x86/*
 [% END %]
 
 [% IF c("var/android-armv7") %]
-    zip -d $apk lib/x86/tor.so
+    zip $apk lib/armeabi-v7a/*
 [% END %]
 
+rm -fR lib
+
 # Sign a QA build. This apk is not a debug version and doesn't contain a debug flag in the manifest
 java -jar /usr/share/apksigner/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



More information about the tor-commits mailing list