commit
d194eb8064
|
@ -1,17 +1,17 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.0'
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit c51b159cff9f5e86696f5b9a4c6f517276056258
|
||||
Subproject commit 90ae4c5013032158bafad41279823d90eec4d206
|
|
@ -1 +1 @@
|
|||
Subproject commit 081314d07705aa58912845c213a48414d8f616a9
|
||||
Subproject commit 3ce7bc40a3c48da1c96c2d04c10045bd797c6aa3
|
|
@ -1 +1 @@
|
|||
Subproject commit 727d3f1b5e6eeda721339151e3cd49ffa7efbb29
|
||||
Subproject commit 31cc63deb69db819ed55aca406ebaaa52500730e
|
Binary file not shown.
|
@ -1,6 +1,5 @@
|
|||
#Tue Oct 31 09:37:18 EDT 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
|
@ -6,42 +6,6 @@
|
|||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
|
@ -60,6 +24,46 @@ cd "`dirname \"$PRG\"`/" >/dev/null
|
|||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
|
@ -85,7 +89,7 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
|
@ -150,11 +154,19 @@ if $cygwin ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
|
@ -46,10 +46,9 @@ echo location of your Java installation.
|
|||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
|
@ -60,11 +59,6 @@ set _SKIP=2
|
|||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
#!/bin/bash
|
||||
# bash is required because we need bash's printf to guarantee a cross-platform
|
||||
# timestamp format.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [ -z $ANDROID_HOME ]; then
|
||||
if [ -e ~/.android/bashrc-ant-build ]; then
|
||||
. ~/.android/bashrc-ant-build
|
||||
else
|
||||
echo "ANDROID_HOME must be set!"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z $ANDROID_NDK_HOME ]; then
|
||||
if which ndk-build 2>&1 /dev/null; then
|
||||
ANDROID_NDK_HOME=`which ndk-build | sed 's,/ndk-build,,'`
|
||||
else
|
||||
echo "ANDROID_NDK_HOME not set and 'ndk-build' not in PATH"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
# reset version code/name to current date
|
||||
versionCodeDate=`date +%s`
|
||||
versionNameDate=`date +%Y-%m-%d_%H.%M.%S`
|
||||
|
||||
sed -i \
|
||||
-e "s,android:versionCode=\"[0-9][0-9]*\",android:versionCode=\"$versionCodeDate\"," \
|
||||
-e "s,android:versionName=\"\([^\"][^\"]*\)\",android:versionName=\"\1.$versionNameDate\"," \
|
||||
AndroidManifest.xml
|
||||
|
||||
ndk-build
|
||||
make -C external
|
||||
./setup-ant
|
|
@ -1,103 +0,0 @@
|
|||
#!/bin/bash
|
||||
# bash is required because we need bash's printf to guarantee a cross-platform
|
||||
# timestamp format.
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# make sure we're on a signed tag that matches the version name
|
||||
versionName=`sed -n 's,.*versionName="\([^"]*\)".*,\1,p' AndroidManifest.xml`
|
||||
describe=`git describe`
|
||||
if [ $versionName != $describe ]; then
|
||||
echo "WARNING: building $describe, which is not the latest release ($versionName)"
|
||||
else
|
||||
# make a clearer warning above by putting this here
|
||||
set +x
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Checking git tag signature for release build:"
|
||||
gpg --list-key 9F0FE587374BBE81 || gpg --recv-key 9F0FE587374BBE81
|
||||
gpg --list-key E9E28DEA00AA5556 || gpg --recv-key E9E28DEA00AA5556
|
||||
gpg --list-key A801183E69B37AA9 || gpg --recv-key A801183E69B37AA9
|
||||
git tag -v $versionName
|
||||
echo ""
|
||||
echo ""
|
||||
set -x
|
||||
fi
|
||||
|
||||
|
||||
if [ -z $ANDROID_HOME ]; then
|
||||
if [ -e ~/.android/bashrc-ant-build ]; then
|
||||
. ~/.android/bashrc-ant-build
|
||||
else
|
||||
echo "ANDROID_HOME must be set!"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z $ANDROID_NDK_HOME ]; then
|
||||
if which ndk-build 2>&1 /dev/null; then
|
||||
ANDROID_NDK_HOME=`which ndk-build | sed 's,/ndk-build,,'`
|
||||
else
|
||||
echo "ANDROID_NDK_HOME not set and 'ndk-build' not in PATH"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
projectroot=`pwd`
|
||||
projectname=`sed -n 's,.*name="app_name">\(.*\)<.*,\1,p' app/src/main/res/values/strings.xml`
|
||||
|
||||
# standardize timezone to reduce build differences
|
||||
export TZ=UTC
|
||||
TIMESTAMP=`printf '%(%Y-%m-%d %H:%M:%S)T' \
|
||||
$(git log -n1 --format=format:%at)`
|
||||
|
||||
git reset --hard
|
||||
git clean -fdx
|
||||
git submodule foreach git reset --hard
|
||||
git submodule foreach git clean -fdx
|
||||
git submodule sync
|
||||
git submodule foreach git submodule sync
|
||||
git submodule update --init --recursive
|
||||
|
||||
|
||||
if [ -e ~/.android/ant.properties ]; then
|
||||
cp ~/.android/ant.properties $projectroot/
|
||||
else
|
||||
echo "skipping release ant.properties"
|
||||
fi
|
||||
|
||||
cd $projectroot/orbotservice/src/main
|
||||
faketime "$TIMESTAMP" $ANDROID_NDK_HOME/ndk-build
|
||||
cd $projectroot
|
||||
|
||||
#clean, build, clean and build!
|
||||
make -C external clean
|
||||
APP_ABI=armeabi faketime "$TIMESTAMP" make -C external
|
||||
#make -C external clean
|
||||
#APP_ABI=x86 faketime "$TIMESTAMP" make -C external
|
||||
|
||||
./gradlew assembleRelease
|
||||
#./setup-ant
|
||||
#ant release
|
||||
|
||||
#apk=$projectroot/bin/$projectname-v$describe.apk
|
||||
apk=$projectroot/app/build/outputs/apk/app-release-unsigned.apk
|
||||
|
||||
# standardize timestamps in ZIP headers, requires strip-nondeterminism 0.014
|
||||
if which strip-nondeterminism > /dev/null; then
|
||||
strip-nondeterminism -t zip -T $(git log -n1 --format=format:%at) $apk
|
||||
fi
|
||||
|
||||
# echo the checksum to build logs
|
||||
sha256sum $apk
|
||||
|
||||
if which gpg > /dev/null; then
|
||||
if [ -z "`gpg --list-secret-keys`" ]; then
|
||||
echo "No GPG secret keys found, not signing APK"
|
||||
else
|
||||
gpg --armor --detach-sign $apk
|
||||
fi
|
||||
else
|
||||
echo "gpg not found, not signing APK"
|
||||
fi
|
|
@ -14,8 +14,8 @@ android {
|
|||
defaultConfig {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 25
|
||||
versionCode 3191
|
||||
versionName "0.3.1.9b"
|
||||
versionCode 3210
|
||||
versionName "0.3.2.10"
|
||||
|
||||
}
|
||||
buildTypes {
|
||||
|
@ -27,10 +27,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:appcompat-v7:25.4.0'
|
||||
compile 'com.jrummyapps:android-shell:1.0.1'
|
||||
compile fileTree(dir: 'libs', include: ['*.jar','*.so'])
|
||||
testCompile 'junit:junit:4.12'
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar','*.so'])
|
||||
}
|
||||
|
||||
apply plugin: 'maven'
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package org.torproject.android.service;
|
||||
|
||||
import android.app.Application;
|
||||
import android.test.ApplicationTestCase;
|
||||
|
||||
/**
|
||||
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
|
||||
*/
|
||||
public class ApplicationTest extends ApplicationTestCase<Application> {
|
||||
public ApplicationTest() {
|
||||
super(Application.class);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -26,7 +26,6 @@ public interface TorServiceConstants {
|
|||
|
||||
int FILE_WRITE_BUFFER_SIZE = 1024;
|
||||
|
||||
String BINARY_TOR_VERSION = "0.3.1.9-openssl1.0.2k";
|
||||
|
||||
String BINARY_TOR_VERSION = "0.3.2.10-openssl1.0.2o";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue