Update gradle build

This commit is contained in:
Brian Pellin 2017-03-29 22:21:59 -05:00
parent 9fa5eececf
commit dbebc8a0b7
6 changed files with 94 additions and 26 deletions

View file

@ -9,7 +9,6 @@
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="flavor1Debug" />
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
<option name="ASSEMBLE_TASK_NAME" value="assembleFlavor1Debug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileFlavor1DebugSources" />
<afterSyncTasks>
@ -53,13 +52,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/flavor1Debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/flavor1Debug/renderscript" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/flavor1Debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/flavor1/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/flavor1/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/flavor1/debug" isTestSource="true" generated="true" />
@ -67,6 +59,14 @@
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/flavor1/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/flavor1/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/flavor1/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1Debug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/flavor1/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/flavor1/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/flavor1/assets" type="java-resource" />
@ -74,20 +74,22 @@
<sourceFolder url="file://$MODULE_DIR$/src/flavor1/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/flavor1/renderscript" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/flavor1/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testFlavor1/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestFlavor1/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
@ -100,6 +102,7 @@
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
@ -109,20 +112,22 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/renderscript" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/renderscript" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/renderscript" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/renderscript" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/binaries" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />

View file

@ -3,7 +3,7 @@ apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion = 22
buildToolsVersion = "23.0.0"
buildToolsVersion = "25.0.0"
defaultConfig.with {
applicationId = "com.android.keepass"

View file

@ -0,0 +1,8 @@
package com.keepassdroid.crypto.engine;
/**
* Created by bpellin on 1/29/17.
*/
public class CipherEngine {
}

View file

@ -0,0 +1,55 @@
/*
* Copyright 2017 Brian Pellin.
*
* This file is part of KeePassDroid.
*
* KeePassDroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* KeePassDroid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with KeePassDroid. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.keepassdroid.stream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class HmacBlockStream {
public static byte[] GetHmacKey64(byte[] key, long blockIndex) {
MessageDigest hash;
try {
hash = MessageDigest.getInstance("SHA-512");
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
NullOutputStream nos = new NullOutputStream();
DigestOutputStream dos = new DigestOutputStream(nos, hash);
LEDataOutputStream leos = new LEDataOutputStream(dos);
try {
leos.writeLong(blockIndex);
leos.write(key);
leos.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
byte[] hashKey = hash.digest();
assert(hashKey.length == 64);
return hashKey;
}
}

View file

@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle-experimental:0.8.3'
classpath 'com.android.tools.build:gradle-experimental:0.9.0'
}
}

View file

@ -1,6 +1,6 @@
#Mon Oct 24 20:32:21 CDT 2016
#Sun Mar 26 15:21:55 CDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip