2
0

Fix native scrypt on Android.

This commit is contained in:
Maarten Billemont 2017-02-09 00:48:07 -05:00
parent b46bf25c19
commit f8f48743b0
7 changed files with 27 additions and 16 deletions

View File

@ -1,5 +1,4 @@
allprojects { allprojects {
apply plugin: 'maven'
//apply plugin: 'findbugs' //apply plugin: 'findbugs'
group = 'com.lyndir.masterpassword' group = 'com.lyndir.masterpassword'

View File

@ -1,6 +1,6 @@
#Mon Feb 06 10:38:22 EST 2017 #Wed Feb 08 01:04:17 EST 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
############################################################################## ##############################################################################
## ##
@ -154,16 +154,19 @@ if $cygwin ; then
esac esac
fi fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules # Escape application args
function splitJvmOpts() { save ( ) {
JVM_OPTS=("$@") for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
} }
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS APP_ARGS=$(save "$@")
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# 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 # 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 if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")" cd "$(dirname "$0")"
fi fi
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" exec "$JAVACMD" "$@"

View File

@ -3,7 +3,7 @@ apply plugin: 'java'
description = 'Master Password Algorithm Implementation' description = 'Master Password Algorithm Implementation'
dependencies { dependencies {
compile( 'com.lyndir.lhunath.opal:opal-system:1.6-p9' ) { compile( 'com.lyndir.lhunath.opal:opal-system:1.6-p10' ) {
exclude( module: 'joda-time' ) exclude( module: 'joda-time' )
} }
compile 'com.lambdaworks:scrypt:1.4.0' compile 'com.lambdaworks:scrypt:1.4.0'

View File

@ -1,9 +1,16 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
android { android {
signingConfigs {
lyndir {
keyAlias 'lyndir'
keyPassword 'JaxeMeruDafc0('
storeFile file('/Users/lhunath/annex/secret/lyndir.keystore')
storePassword 'JaxeMeruDafc0('
}
}
compileSdkVersion 25 compileSdkVersion 25
buildToolsVersion "25.0.0" buildToolsVersion "25.0.0"
defaultConfig { defaultConfig {
applicationId "com.lyndir.masterpassword" applicationId "com.lyndir.masterpassword"
minSdkVersion 19 minSdkVersion 19
@ -20,8 +27,10 @@ android {
dependencies { dependencies {
compile project( ':masterpassword-algorithm' ) compile project( ':masterpassword-algorithm' )
compile project( ':masterpassword-tests' ) compile project( ':masterpassword-tests' )
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.jakewharton:butterknife:8.5.1' // Android dependencies
compile 'com.lambdaworks:scrypt:1.4.0-android'
compile 'org.slf4j:slf4j-android:1.7.13-underscore' compile 'org.slf4j:slf4j-android:1.7.13-underscore'
compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile files('libs/scrypt-1.4.0-native.jar')
} }