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

Bug 30460: Update TOPL Project to Use Android Toolchain (Firefox 68)

Update TOPL version
parent 98a22a9b
From 4402f247643c7b3b730f0facaf1c45dc02d5721f Mon Sep 17 00:00:00 2001
From: sisbell <shane.isbell@gmail.com>
Date: Thu, 16 May 2019 21:33:06 +0000
Subject: [PATCH] Fixes thaliproject#120: Tor Startup Broken on KitKat Devices
diff --git a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfig.java b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfig.java
index 3df0f12..1ab7c2d 100644
--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfig.java
+++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfig.java
@@ -372,7 +372,7 @@ public final class TorConfig {
public TorConfig build() {
if(homeDir == null) {
String userHome = System.getProperty("user.home");
- homeDir = (userHome != null && !"".equals(userHome)) ? new File(userHome) : configDir;
+ homeDir = (userHome != null && !"".equals(userHome) && !"/".equals(userHome)) ? new File(userHome) : configDir;
}
if (torExecutableFile == null) {
--
2.20.1
diff --git a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
index 731fb3e..e0d0c42 100644
--- a/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
+++ b/universal/src/main/java/com/msopentech/thali/toronionproxy/TorConfigBuilder.java
@@ -395,6 +395,9 @@ public final class TorConfigBuilder {
if (!isNullOrEmpty(isolationFlag)) {
buffer.append(" ").append(isolationFlag);
}
+ buffer.append(" KeepAliveIsolateSOCKSAuth");
+ buffer.append(" IPv6Traffic");
+ buffer.append(" PreferIPv6");
buffer.append('\n');
return this;
}
......@@ -2,7 +2,6 @@
[% c("var/set_default_env") -%]
output_dir=[% dest_dir %]/[% c('filename') %]
gradle_repo=$rootdir/[% c('input_files_by_name/gradle-dependencies') %]
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
......@@ -18,12 +17,10 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
# Patch projects
cd /var/tmp/build/[% project %]-[% c('version') %]
patch -p1 < $rootdir/maven-repo.patch
patch -p1 < $rootdir/add_socks_port_flags.patch
patch -p1 < $rootdir/30284.patch
patch -p1 < $rootdir/gradle.patch
# Build Android Libraries and Apps
$GRADLE_HOME/gradle-4.1/bin/gradle --offline -P androidplugin=3.0.1 assembleRelease -x lint
$GRADLE_HOME/gradle-4.10.2/bin/gradle --offline --no-daemon -P androidplugin=3.1.0 -Dmaven.repo.local=$gradle_repo assembleRelease -x lint
# Package
cp universal/build/libs/* android/build/outputs/aar/* $output_dir
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %]'
git_hash: 27df20a5cb107a009db009df4aaef000a6e78e2e
git_url: https://github.com/sisbell/Tor_Onion_Proxy_Library.git
git_hash: a720e25bcdada2e6ba5c8cb1f566a6b633b79dc5
git_url: https://github.com/thaliproject/Tor_Onion_Proxy_Library.git
git_submodule: 1
var:
......@@ -13,7 +13,7 @@ var:
container:
use_container: 1
# this should be updated when the list of gradle dependencies is changed
gradle_dependencies_version: 2
gradle_dependencies_version: 3
targets:
android:
......@@ -28,6 +28,4 @@ input_files:
- filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
name: gradle-dependencies
exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
- filename: maven-repo.patch
- filename: add_socks_port_flags.patch
- filename: 30284.patch
- filename: gradle.patch
diff --git a/android/build.gradle b/android/build.gradle
index a8d9bdc..e8faf8c 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -15,7 +15,7 @@ buildscript {
android {
compileSdkVersion 28
-
+ buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
diff --git a/android_tor_installer/build.gradle b/android_tor_installer/build.gradle
index 554fd49..4059748 100644
--- a/android_tor_installer/build.gradle
+++ b/android_tor_installer/build.gradle
@@ -15,6 +15,7 @@ buildscript {
android {
compileSdkVersion 28
+ buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 16
diff --git a/android/build.gradle b/android/build.gradle
index b6d8608..38093be 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -7,6 +7,7 @@ buildscript {
mavenLocal()
mavenCentral()
google()
+ maven { url System.getenv("GRADLE_MAVEN_REPO") }
}
dependencies {
classpath "com.android.tools.build:gradle:${androidplugin}"
@@ -82,6 +83,7 @@ repositories {
mavenCentral()
google()
maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" }
+ maven { url System.getenv("GRADLE_MAVEN_REPO") }
}
/**
diff --git a/android_tor_installer/build.gradle b/android_tor_installer/build.gradle
index 1bc0343..7d8e886 100644
--- a/android_tor_installer/build.gradle
+++ b/android_tor_installer/build.gradle
@@ -7,6 +7,7 @@ buildscript {
mavenLocal()
mavenCentral()
google()
+ maven { url System.getenv("GRADLE_MAVEN_REPO") }
}
dependencies {
classpath "com.android.tools.build:gradle:${androidplugin}"
@@ -50,5 +51,6 @@ repositories {
google()
maven { url "https://repo.spring.io/plugins-release" }
maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" }
+ maven { url System.getenv("GRADLE_MAVEN_REPO") }
}
diff --git a/build.gradle b/build.gradle
index a269024..430f3e1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,6 +9,7 @@ subprojects {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/plugins-release" }
+ maven { url System.getenv("GRADLE_MAVEN_REPO") }
}
}
Markdown is supported
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