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

Bug 30461: Update tor-android-service Project to Use Android Toolchain (Firefox 68)

parent a479eeb4
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
[% c("var/set_default_env") -%] [% c("var/set_default_env") -%]
output_dir=[% dest_dir %]/[% c('filename') %] output_dir=[% dest_dir %]/[% c('filename') %]
gradle_repo=$rootdir/[% c('input_files_by_name/gradle-dependencies') %] 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. # 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 # 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/dl/android/maven2/* $gradle_repo
...@@ -15,10 +13,11 @@ mkdir -p /var/tmp/build $output_dir ...@@ -15,10 +13,11 @@ mkdir -p /var/tmp/build $output_dir
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %] [% 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 tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
# Patch projects
cd /var/tmp/build/[% project %]-[% c('version') %] cd /var/tmp/build/[% project %]-[% c('version') %]
patch -p1 < $rootdir/gradle.patch
patch -p1 < $rootdir/require-api.patch patch -p1 < $rootdir/require-api.patch
patch -p1 < $rootdir/remove-native-build.patch
patch -p1 < $rootdir/disable-daemon.patch
patch -p1 < $rootdir/maven-local.patch
# Remove native files, otherwise build will fail after gradle.patch # Remove native files, otherwise build will fail after gradle.patch
rm -fR service/src/main/jni rm -fR service/src/main/jni
...@@ -28,7 +27,7 @@ rm service/libs/* ...@@ -28,7 +27,7 @@ rm service/libs/*
cp $rootdir/[% c('input_files_by_name/topl') %]/*{.aar,.jar} service/libs/ cp $rootdir/[% c('input_files_by_name/topl') %]/*{.aar,.jar} service/libs/
# Build Android Libraries and Apps # Build Android Libraries and Apps
$GRADLE_HOME/gradle-4.1/bin/gradle --offline -P androidplugin=3.0.1 -P appcompatVersion=23.4.0 -P compileVersion=26 -P targetVersion=26 -P minVersion=16 assembleRelease -x lint $GRADLE_HOME/gradle-4.10.2/bin/gradle --offline --no-daemon -P androidplugin=3.1.0 -P appcompatVersion=28.0.0 -P compileVersion=28 -P targetVersion=28 -P minVersion=16 -Dmaven.repo.local=$gradle_repo assembleRelease -x lint
# Package # Package
cp jsocksAndroid/build/outputs/aar/* service/build/outputs/aar/* $output_dir cp jsocksAndroid/build/outputs/aar/* service/build/outputs/aar/* $output_dir
...@@ -11,7 +11,7 @@ var: ...@@ -11,7 +11,7 @@ var:
container: container:
use_container: 1 use_container: 1
# this should be updated when the list of gradle dependencies is changed # this should be updated when the list of gradle dependencies is changed
gradle_dependencies_version: 2 gradle_dependencies_version: 3
targets: targets:
android: android:
...@@ -26,7 +26,9 @@ input_files: ...@@ -26,7 +26,9 @@ input_files:
- filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]' - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
name: gradle-dependencies name: gradle-dependencies
exec: '[% INCLUDE "fetch-gradle-dependencies" %]' exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
- filename: gradle.patch
- filename: require-api.patch
- project: tor-onion-proxy-library - project: tor-onion-proxy-library
name: topl name: topl
- filename: require-api.patch
- filename: remove-native-build.patch
- filename: disable-daemon.patch
- filename: maven-local.patch
diff --git a/gradle.properties b/gradle.properties
index 75f5aba..27d94ab 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,7 +6,6 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
-org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
@@ -21,4 +20,4 @@ androidplugin=3.4.0
appcompatVersion=28.0.0
compileVersion=28
targetVersion=28
-minVersion=21
\ No newline at end of file
+minVersion=21
diff --git a/build.gradle b/build.gradle diff --git a/build.gradle b/build.gradle
index 671edab..d9ecfef 100644 index 671edab..c7870e6 100644
--- a/build.gradle --- a/build.gradle
+++ b/build.gradle +++ b/build.gradle
@@ -5,6 +5,7 @@ buildscript { @@ -5,6 +5,7 @@ buildscript {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
+ maven { url System.getenv("GRADLE_MAVEN_REPO") } + mavenLocal()
} }
dependencies { dependencies {
classpath "com.android.tools.build:gradle:${androidplugin}" classpath "com.android.tools.build:gradle:${androidplugin}"
@@ -20,5 +21,6 @@ allprojects { @@ -18,7 +19,8 @@ allprojects {
repositories {
google()
mavenCentral() mavenCentral()
+ mavenLocal()
maven { url "https://repo.spring.io/plugins-release" } maven { url "https://repo.spring.io/plugins-release" }
maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" } maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" }
+ maven { url System.getenv("GRADLE_MAVEN_REPO") }
}
} }
-}
\ No newline at end of file \ No newline at end of file
diff --git a/service/build.gradle b/service/build.gradle +}
index b414557..ae3e203 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -16,12 +16,6 @@ android {
}
}
- externalNativeBuild {
- ndkBuild {
- path "src/main/jni/Android.mk"
- buildStagingDirectory "./outputs/ndk-build"
- }
- }
lintOptions {
abortOnError false
diff --git a/service/build.gradle b/service/build.gradle
index b414557..ae3e203 100644
--- a/service/build.gradle
+++ b/service/build.gradle
@@ -16,12 +16,6 @@ android {
}
}
- externalNativeBuild {
- ndkBuild {
- path "src/main/jni/Android.mk"
- buildStagingDirectory "./outputs/ndk-build"
- }
- }
lintOptions {
abortOnError false
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