Unverified Commit 4daa5682 authored by Georg Koppen's avatar Georg Koppen
Browse files

Bug 33559: Update tor-android-service to use new Android toolchain

Additionally, we clean up the project to remove unused parts.

Based on a patch by sisbell, thanks!

We add a new project to not interfere with Fennec toolchain
requirements for now until we stop building Fennec-based Tor Browser
for Android.
parent 9907f974
[% c("var/set_default_env") -%]
output_dir=[% dest_dir %]/[% c('filename') %]
gradle_repo=$rootdir/[% c('input_files_by_name/gradle-dependencies') %]
# 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/dl/android/maven2/* $gradle_repo
cp -r $gradle_repo/plugins-release/* $gradle_repo
cp -r $gradle_repo/maven2/* $gradle_repo
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 /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
# Replace pre-packaged tor library with the latest build
rm -fR service/src/main/jniLibs/*
tar -C service/src/main -xf $rootdir/[% c('input_files_by_name/tor') %]/tor.tar.gz
# Replace libraries with the config dependencies
rm service/libs/*
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
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %]'
git_hash: 8f40b9b2a6f4f8c05b84c5a0fec26a4b7ad77098
git_url: https://git.torproject.org/tor-android-service.git
git_submodule: 1
- build-essential
use_container: 1
# this should be updated when the list of gradle dependencies is changed
gradle_dependencies_version: 1
- project: container-image
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
- filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
name: gradle-dependencies
exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
- project: fenix-tor-onion-proxy-library
name: topl
- project: tor
name: tor
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment