|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'com.google.protobuf'
|
|
|
|
|
|
|
|
def getCmdOutput = { cmd ->
|
|
|
|
def stdout = new ByteArrayOutputStream()
|
|
|
|
exec {
|
|
|
|
commandLine cmd
|
|
|
|
standardOutput = stdout
|
|
|
|
}
|
|
|
|
return stdout.toString().trim()
|
|
|
|
}
|
|
|
|
|
|
|
|
def getGitHash = { -> return getCmdOutput(["git", "rev-parse", "--short", "HEAD"]) }
|
|
|
|
def getGitBranch = { -> return getCmdOutput(["git", "rev-parse", "--abbrev-ref", "HEAD"]) }
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 29
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.beemdevelopment.aegis"
|
|
|
|
minSdkVersion 21
|
|
|
|
targetSdkVersion 29
|
|
|
|
versionCode 33
|
|
|
|
versionName "1.2-beta4"
|
|
|
|
multiDexEnabled true
|
|
|
|
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
|
|
|
|
buildConfigField "String", "GIT_BRANCH", "\"${getGitBranch()}\""
|
|
|
|
}
|
Introduce UUIDMap for storing objects that are keyed by a UUID
This patch introduces the new ``UUIDMap`` type, reducing code duplication and
making UUID lookups faster. We currently already use UUIDs as the identifier for
the ``DatabaseEntry`` and ``Slot`` types, but the way lookups by UUID work are
kind of ugly, as we simply iterate over the list until we find a match. As we're
probably going to have more types like this soon (groups and icons, for
example), I figured it'd be good to abstract this away into a separate type and
make it a map instead of a list.
The only thing that has gotten slower is the ``swap`` method. The internal
``LinkedHashMap`` retains insertion order with a linked list, but does not know
about the position of the values, so we basically have to copy the entire map to
simply swap two values. I don't think it's too big of a deal, because swap
operations still take less than a millisecond even with large vaults, but
suggestions for improving this are welcome.
I had to update gradle and JUnit to be able to use the new ``assertThrows``
assertion method, so this patch includes that as well.
6 years ago
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
abortOnError true
|
|
|
|
disable "MissingTranslation"
|
|
|
|
}
|
|
|
|
|
Introduce UUIDMap for storing objects that are keyed by a UUID
This patch introduces the new ``UUIDMap`` type, reducing code duplication and
making UUID lookups faster. We currently already use UUIDs as the identifier for
the ``DatabaseEntry`` and ``Slot`` types, but the way lookups by UUID work are
kind of ugly, as we simply iterate over the list until we find a match. As we're
probably going to have more types like this soon (groups and icons, for
example), I figured it'd be good to abstract this away into a separate type and
make it a map instead of a list.
The only thing that has gotten slower is the ``swap`` method. The internal
``LinkedHashMap`` retains insertion order with a linked list, but does not know
about the position of the values, so we basically have to copy the entire map to
simply swap two values. I don't think it's too big of a deal, because swap
operations still take less than a millisecond even with large vaults, but
suggestions for improving this are welcome.
I had to update gradle and JUnit to be able to use the new ``assertThrows``
assertion method, so this patch includes that as well.
6 years ago
|
|
|
testOptions {
|
|
|
|
unitTests.all {
|
|
|
|
useJUnitPlatform()
|
|
|
|
|
|
|
|
ignoreFailures false
|
|
|
|
testLogging {
|
|
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
|
|
}
|
Introduce UUIDMap for storing objects that are keyed by a UUID
This patch introduces the new ``UUIDMap`` type, reducing code duplication and
making UUID lookups faster. We currently already use UUIDs as the identifier for
the ``DatabaseEntry`` and ``Slot`` types, but the way lookups by UUID work are
kind of ugly, as we simply iterate over the list until we find a match. As we're
probably going to have more types like this soon (groups and icons, for
example), I figured it'd be good to abstract this away into a separate type and
make it a map instead of a list.
The only thing that has gotten slower is the ``swap`` method. The internal
``LinkedHashMap`` retains insertion order with a linked list, but does not know
about the position of the values, so we basically have to copy the entire map to
simply swap two values. I don't think it's too big of a deal, because swap
operations still take less than a millisecond even with large vaults, but
suggestions for improving this are welcome.
I had to update gradle and JUnit to be able to use the new ``assertThrows``
assertion method, so this patch includes that as well.
6 years ago
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
|
|
|
manifestPlaceholders = [title: "AegisDev", iconName: "ic_launcher_debug"]
|
|
|
|
resValue "bool", "pref_secure_screen_default", "false"
|
|
|
|
postprocessing {
|
|
|
|
removeUnusedCode true
|
|
|
|
removeUnusedResources true
|
|
|
|
obfuscate false
|
|
|
|
optimizeCode false
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-defaults.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
release {
|
|
|
|
manifestPlaceholders = [title: "Aegis", iconName: "ic_launcher"]
|
|
|
|
resValue "bool", "pref_secure_screen_default", "true"
|
|
|
|
postprocessing {
|
|
|
|
removeUnusedCode true
|
|
|
|
removeUnusedResources true
|
|
|
|
obfuscate false
|
|
|
|
optimizeCode true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-defaults.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
Introduce UUIDMap for storing objects that are keyed by a UUID
This patch introduces the new ``UUIDMap`` type, reducing code duplication and
making UUID lookups faster. We currently already use UUIDs as the identifier for
the ``DatabaseEntry`` and ``Slot`` types, but the way lookups by UUID work are
kind of ugly, as we simply iterate over the list until we find a match. As we're
probably going to have more types like this soon (groups and icons, for
example), I figured it'd be good to abstract this away into a separate type and
make it a map instead of a list.
The only thing that has gotten slower is the ``swap`` method. The internal
``LinkedHashMap`` retains insertion order with a linked list, but does not know
about the position of the values, so we basically have to copy the entire map to
simply swap two values. I don't think it's too big of a deal, because swap
operations still take less than a millisecond even with large vaults, but
suggestions for improving this are welcome.
I had to update gradle and JUnit to be able to use the new ``assertThrows``
assertion method, so this patch includes that as well.
6 years ago
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
targetCompatibility 1.8
|
|
|
|
sourceCompatibility 1.8
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
protobuf {
|
|
|
|
protoc {
|
|
|
|
artifact = 'com.google.protobuf:protoc:3.8.0'
|
|
|
|
}
|
|
|
|
generateProtoTasks {
|
|
|
|
all().each { task ->
|
|
|
|
task.builtins {
|
|
|
|
java {
|
|
|
|
option "lite"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
def glideVersion = '4.11.0'
|
|
|
|
def guavaVersion = '29.0'
|
|
|
|
def junitVersion = '5.6.2'
|
|
|
|
def libsuVersion = '2.5.1'
|
|
|
|
|
|
|
|
annotationProcessor 'androidx.annotation:annotation:1.1.0'
|
|
|
|
annotationProcessor "com.github.bumptech.glide:compiler:${glideVersion}"
|
|
|
|
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
|
|
implementation "androidx.biometric:biometric:1.0.1"
|
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
|
|
implementation 'androidx.preference:preference:1.1.1'
|
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
|
|
|
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
|
|
|
implementation 'com.getbase:floatingactionbutton:1.10.1'
|
|
|
|
implementation 'com.github.apl-devs:appintro:6.0.0'
|
|
|
|
implementation 'com.github.avito-tech:krop:0.44'
|
|
|
|
implementation "com.github.bumptech.glide:annotations:${glideVersion}"
|
|
|
|
implementation "com.github.bumptech.glide:glide:${glideVersion}"
|
|
|
|
implementation("com.github.bumptech.glide:recyclerview-integration:${glideVersion}") {
|
|
|
|
transitive = false
|
|
|
|
}
|
|
|
|
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
|
|
|
|
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}"
|
|
|
|
implementation "com.google.guava:guava:${guavaVersion}-android"
|
|
|
|
implementation 'com.google.android.material:material:1.1.0'
|
|
|
|
implementation 'com.google.protobuf:protobuf-javalite:3.12.1'
|
|
|
|
implementation "com.mikepenz:iconics-core:3.2.5"
|
|
|
|
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.5@aar'
|
|
|
|
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
|
|
|
implementation 'de.psdev.licensesdialog:licensesdialog:2.1.0'
|
|
|
|
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
|
|
|
|
implementation 'net.lingala.zip4j:zip4j:2.6.0'
|
|
|
|
implementation 'org.bouncycastle:bcprov-jdk15on:1.65'
|
|
|
|
|
|
|
|
testImplementation "com.google.guava:guava:${guavaVersion}-jre"
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
|
|
|
|
}
|