Commit d7117d98 authored by sisbell's avatar sisbell Committed by Georg Koppen
Browse files

Bug 29574: Configure Orbot to Use TOPL and tor-android-service Libraries

parent 63d8e8c2
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
diff --git a/app/build.gradle b/app/build.gradle
index 3051dd5c..ef178e91 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -76,12 +76,16 @@ android {
 dependencies {
 //    implementation 'com.github.delight-im:Android-Languages:v1.0.1'
     implementation 'com.android.support.constraint:constraint-layout:1.1.3'
-    implementation project(':orbotservice')
     // Match Fennec's ANDROID_SUPPORT_LIBRARY_VERSION
     implementation 'com.android.support:design:23.4.0'
     implementation 'pl.bclogic:pulsator4droid:1.0.3'
     // These require higher versions of ANDROID_SUPPORT_LIBRARY_VERSION
     //implementation 'com.github.apl-devs:appintro:v4.2.2'
     //implementation 'com.github.javiersantos:AppUpdater:2.6.4'
+    implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
+    implementation 'com.android.support:appcompat-v7:23.4.0'
+    implementation 'net.freehaven.tor.control:jtorctl:0.2'
+    implementation 'org.slf4j:slf4j-api:1.7.25'
+    implementation 'org.slf4j:slf4j-android:1.7.25'
 
 }
diff --git a/settings.gradle b/settings.gradle
index 9984a03e..e7b4def4 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,2 +1 @@
-include ':jsocksAndroid', ':orbotservice'
 include ':app'
+10 −13
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@ export GRADLE_MAVEN_REPO="file://$gradle_repo"

# The download script assumes artifact package name is the complete URL path.
# In some cases this is incorrect, so copy those artifacts to correct location
cp -r $gradle_repo/guardianproject/gpmaven/master/* $gradle_repo
cp -r $gradle_repo/dl/android/maven2/* $gradle_repo

mkdir -p /var/tmp/build $output_dir
@@ -20,20 +19,18 @@ for p in $rootdir/*.patch
  do patch -p1 < $p
done

# Use Orbot's PT capabilities
[% IF c("var/android-armv7") %]
  arch=armeabi-v7a
[% ELSE %]
  arch=x86
[% END %]
obfs4dir=orbotservice/src/main/libs/$arch
mkdir -p $obfs4dir
mv external/pluto/bin/$arch/obfs4proxy $obfs4dir/obfs4proxy.so
mkdir app/libs
cp $rootdir/[% c('input_files_by_name/tor-android-service') %]/*.aar app/libs/
cp $rootdir/[% c('input_files_by_name/topl') %]/* app/libs/

# Build Android Libraries and Apps
$GRADLE_HOME/gradle-4.1/bin/gradle --offline assembleRelease -x lint

# Remove these classes so we don't have problem with duplicates later in the build
orbot_apk=app/build/outputs/aar/Orbot-*.aar
unzip $orbot_apk classes.jar -d .
zip classes.jar --delete "com/runjva/*" "com/msopentech/*" "org/torproject/android/service/*"
zip -r $orbot_apk classes.jar

# Package
cp app/build/outputs/aar/* $output_dir
cp orbotservice/build/outputs/aar/* $output_dir
cp jsocksAndroid/build/outputs/aar/* $output_dir
cp $orbot_apk $output_dir
+6 −7
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@ version: '[% c("abbrev") %]'
filename: 'orbot-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]'
git_hash: '[% c("var/orbot_version") %]-tor-[% c("var/tor_version") %]'
git_url: https://git.torproject.org/orbot.git
git_submodule: 1

var:
  tor_version: 0.3.4.9
@@ -13,15 +12,10 @@ var:
    - autotools-dev
    - unzip
    - zip
    - automake
    - autoconf
    - libtool
    - gettext-base
    - autopoint
  container:
    use_container: 1
  # this should be updated when the list of gradle dependencies is changed
  gradle_dependencies_version: 1
  gradle_dependencies_version: 2

targets:
  android:
@@ -33,6 +27,10 @@ input_files:
  - project: container-image
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
  - project: tor-android-service
    name: tor-android-service
  - project: tor-onion-proxy-library
    name: topl
  - filename: 0001-Bug-28051-Build-Orbot-as-a-library.patch
  - filename: 0002-Bug-28051-Exclude-the-AppUpdater.patch
  - filename: 0003-Bug-28051-Delete-the-Onboarding-activity.patch
@@ -47,6 +45,7 @@ input_files:
  - filename: 0012-Bug-28051-Escape-the-apostrophe-correctly.patch
  - filename: 0013-Bug-28051-Add-a-notification-compatibility-class.patch
  - filename: 0014-Bug-29794-Update-built-in-bridges.patch
  - filename: 0015-dependencies.patch
  - filename: set_gradle_repo_to_local.patch
  - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
    name: gradle-dependencies
+167 −166

File changed.

Preview size limit exceeded, changes collapsed.