2016-08-15 21:29:41 +02:00
|
|
|
apply plugin: 'com.android.application'
|
2020-05-09 15:32:57 +02:00
|
|
|
apply plugin: 'com.google.protobuf'
|
2022-02-06 19:00:01 +01:00
|
|
|
apply plugin: 'dagger.hilt.android.plugin'
|
2016-08-15 21:29:41 +02:00
|
|
|
|
2019-09-07 21:17:32 +02:00
|
|
|
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"]) }
|
|
|
|
|
2020-12-04 21:23:10 +01:00
|
|
|
def packageName = "com.beemdevelopment.aegis"
|
|
|
|
def fileProviderAuthority = "${packageName}.fileprovider"
|
|
|
|
def fileProviderAuthorityDebug = "${packageName}.debug.fileprovider"
|
2020-10-25 21:42:26 +01:00
|
|
|
|
2016-08-15 21:29:41 +02:00
|
|
|
android {
|
2023-08-30 14:26:12 +02:00
|
|
|
compileSdk 33
|
2016-08-15 21:29:41 +02:00
|
|
|
|
2022-10-09 12:51:06 +02:00
|
|
|
namespace packageName
|
|
|
|
|
2016-08-15 21:29:41 +02:00
|
|
|
defaultConfig {
|
2020-12-04 21:23:10 +01:00
|
|
|
applicationId "${packageName}"
|
2020-01-04 22:06:59 +01:00
|
|
|
minSdkVersion 21
|
2022-09-03 23:14:43 -04:00
|
|
|
targetSdkVersion 33
|
2023-09-09 12:15:32 +02:00
|
|
|
versionCode 62
|
|
|
|
versionName "2.2.2"
|
2019-12-26 20:47:28 +01:00
|
|
|
multiDexEnabled true
|
2019-09-07 21:17:32 +02:00
|
|
|
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
|
|
|
|
buildConfigField "String", "GIT_BRANCH", "\"${getGitBranch()}\""
|
2022-02-17 15:47:27 +01:00
|
|
|
buildConfigField "java.util.concurrent.atomic.AtomicBoolean", "TEST", "new java.util.concurrent.atomic.AtomicBoolean(false)"
|
2020-05-30 13:50:44 +02:00
|
|
|
|
|
|
|
testInstrumentationRunner "com.beemdevelopment.aegis.AegisTestRunner"
|
|
|
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
2016-08-15 21:29:41 +02:00
|
|
|
}
|
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.
2019-06-10 18:25:44 +02:00
|
|
|
|
|
|
|
testOptions {
|
2020-07-01 19:44:58 +02:00
|
|
|
execution 'ANDROIDX_TEST_ORCHESTRATOR'
|
|
|
|
|
2020-12-16 21:44:37 +01:00
|
|
|
unitTests {
|
|
|
|
all {
|
|
|
|
maxHeapSize "3g"
|
|
|
|
|
|
|
|
ignoreFailures false
|
|
|
|
testLogging {
|
|
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
|
|
|
|
|
|
showExceptions true
|
|
|
|
exceptionFormat "full"
|
|
|
|
showCauses true
|
|
|
|
showStackTraces true
|
|
|
|
}
|
2019-05-15 22:01:47 +02:00
|
|
|
}
|
2020-12-16 21:44:37 +01:00
|
|
|
|
|
|
|
includeAndroidResources true
|
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.
2019-06-10 18:25:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-15 21:29:41 +02:00
|
|
|
buildTypes {
|
2017-12-12 12:25:55 +01:00
|
|
|
debug {
|
|
|
|
applicationIdSuffix ".debug"
|
2020-12-04 21:23:10 +01:00
|
|
|
manifestPlaceholders = [
|
|
|
|
title: "AegisDev",
|
|
|
|
iconName: "ic_launcher_debug",
|
|
|
|
fileProviderAuthority: "${fileProviderAuthorityDebug}"
|
|
|
|
]
|
|
|
|
buildConfigField("String", "FILE_PROVIDER_AUTHORITY", "\"${fileProviderAuthorityDebug}\"")
|
2019-06-19 14:19:49 +02:00
|
|
|
resValue "bool", "pref_secure_screen_default", "false"
|
2017-12-12 12:25:55 +01:00
|
|
|
}
|
2016-08-15 21:29:41 +02:00
|
|
|
release {
|
2020-12-04 21:23:10 +01:00
|
|
|
manifestPlaceholders = [
|
|
|
|
title: "Aegis",
|
|
|
|
iconName: "ic_launcher",
|
|
|
|
fileProviderAuthority: "${fileProviderAuthority}"
|
|
|
|
]
|
|
|
|
buildConfigField("String", "FILE_PROVIDER_AUTHORITY", "\"${fileProviderAuthority}\"")
|
2019-06-19 14:19:49 +02:00
|
|
|
resValue "bool", "pref_secure_screen_default", "true"
|
2022-10-09 17:18:13 +02:00
|
|
|
|
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
2016-08-15 21:29:41 +02:00
|
|
|
}
|
|
|
|
}
|
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.
2019-06-10 18:25:44 +02:00
|
|
|
|
2022-10-09 17:18:13 +02:00
|
|
|
packagingOptions {
|
|
|
|
// R8 doesn't remove these resources, so exclude them manually. This reduces APK size by 4MB.
|
2022-11-01 20:19:00 +01:00
|
|
|
resources {
|
|
|
|
excludes += ['/org/bouncycastle/pqc/**/*.properties']
|
|
|
|
}
|
2022-10-09 17:18:13 +02:00
|
|
|
}
|
|
|
|
|
2016-10-25 23:53:33 +02:00
|
|
|
compileOptions {
|
|
|
|
targetCompatibility 1.8
|
|
|
|
sourceCompatibility 1.8
|
2020-07-12 18:09:50 +02:00
|
|
|
coreLibraryDesugaringEnabled true
|
2016-10-25 23:53:33 +02:00
|
|
|
}
|
2022-04-09 18:28:15 +02:00
|
|
|
lint {
|
|
|
|
abortOnError true
|
|
|
|
checkDependencies true
|
2022-04-10 14:41:55 +02:00
|
|
|
disable 'MissingQuantity', 'MissingTranslation'
|
2022-04-09 18:28:15 +02:00
|
|
|
}
|
2016-08-15 21:29:41 +02:00
|
|
|
}
|
|
|
|
|
2020-05-09 15:32:57 +02:00
|
|
|
protobuf {
|
|
|
|
protoc {
|
|
|
|
artifact = 'com.google.protobuf:protoc:3.8.0'
|
|
|
|
}
|
|
|
|
generateProtoTasks {
|
|
|
|
all().each { task ->
|
|
|
|
task.builtins {
|
|
|
|
java {
|
|
|
|
option "lite"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-15 21:29:41 +02:00
|
|
|
dependencies {
|
2023-08-30 14:26:12 +02:00
|
|
|
def cameraxVersion = '1.2.3'
|
|
|
|
def glideVersion = '4.16.0'
|
|
|
|
def guavaVersion = '32.1.2'
|
|
|
|
def hiltVersion = '2.47'
|
2021-02-14 16:03:30 +01:00
|
|
|
def junitVersion = '4.13.2'
|
2023-08-30 14:26:12 +02:00
|
|
|
def libsuVersion = '5.2.0'
|
2020-05-24 12:50:11 +02:00
|
|
|
|
2023-03-01 13:32:48 +01:00
|
|
|
annotationProcessor 'androidx.annotation:annotation:1.6.0'
|
2022-02-06 19:00:01 +01:00
|
|
|
annotationProcessor "com.google.dagger:hilt-compiler:$hiltVersion"
|
2020-05-24 12:50:11 +02:00
|
|
|
annotationProcessor "com.github.bumptech.glide:compiler:${glideVersion}"
|
|
|
|
|
2023-08-30 14:26:12 +02:00
|
|
|
// Ridiculous fix for a bunch of "Duplicate class" build errors:
|
2023-08-31 23:33:14 +02:00
|
|
|
implementation (platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
|
2023-08-30 14:26:12 +02:00
|
|
|
|
2018-05-08 19:31:47 +02:00
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
2023-08-30 14:26:12 +02:00
|
|
|
implementation 'androidx.activity:activity:1.7.2'
|
2023-03-01 13:32:48 +01:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
2021-02-08 18:46:56 +01:00
|
|
|
implementation "androidx.biometric:biometric:1.1.0"
|
2020-06-07 22:29:52 +02:00
|
|
|
implementation "androidx.camera:camera-camera2:$cameraxVersion"
|
|
|
|
implementation "androidx.camera:camera-lifecycle:$cameraxVersion"
|
2023-08-30 14:26:12 +02:00
|
|
|
implementation 'androidx.camera:camera-view:1.2.3'
|
2018-09-25 16:26:57 +02:00
|
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
2023-08-30 14:26:12 +02:00
|
|
|
implementation "androidx.core:core:1.10.1"
|
2022-08-03 20:38:10 +02:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2020-06-07 22:29:52 +02:00
|
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
2023-08-30 14:26:12 +02:00
|
|
|
implementation "androidx.lifecycle:lifecycle-process:2.6.1"
|
|
|
|
implementation "androidx.preference:preference:1.2.1"
|
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.1'
|
2020-07-01 19:44:58 +02:00
|
|
|
implementation "androidx.viewpager2:viewpager2:1.0.0"
|
2020-05-24 12:50:11 +02:00
|
|
|
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
2020-07-08 11:18:40 +02:00
|
|
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
2022-02-06 19:00:01 +01:00
|
|
|
implementation "com.google.dagger:hilt-android:$hiltVersion"
|
2021-02-08 18:46:56 +01:00
|
|
|
implementation 'com.github.avito-tech:krop:0.52'
|
2020-05-24 12:50:11 +02:00
|
|
|
implementation "com.github.bumptech.glide:annotations:${glideVersion}"
|
|
|
|
implementation "com.github.bumptech.glide:glide:${glideVersion}"
|
|
|
|
implementation("com.github.bumptech.glide:recyclerview-integration:${glideVersion}") {
|
|
|
|
transitive = false
|
|
|
|
}
|
2019-03-23 20:48:02 +01:00
|
|
|
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
|
|
|
|
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}"
|
2020-05-24 12:50:11 +02:00
|
|
|
implementation "com.google.guava:guava:${guavaVersion}-android"
|
2023-08-30 14:26:12 +02:00
|
|
|
implementation 'com.google.android.material:material:1.9.0'
|
2023-03-01 13:32:48 +01:00
|
|
|
implementation 'com.google.protobuf:protobuf-javalite:3.22.0'
|
2023-08-30 14:26:12 +02:00
|
|
|
implementation 'com.google.zxing:core:3.5.2'
|
2019-09-05 00:24:33 +02:00
|
|
|
implementation "com.mikepenz:iconics-core:3.2.5"
|
|
|
|
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.5@aar'
|
2023-08-30 14:26:12 +02:00
|
|
|
implementation 'com.nulab-inc:zxcvbn:1.8.2'
|
2020-05-24 12:50:11 +02:00
|
|
|
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
2021-07-22 21:17:04 +02:00
|
|
|
implementation 'de.psdev.licensesdialog:licensesdialog:2.2.0'
|
2023-03-01 13:32:48 +01:00
|
|
|
implementation 'net.lingala.zip4j:zip4j:2.11.5'
|
2020-08-16 22:45:02 +02:00
|
|
|
implementation 'info.guardianproject.trustedintents:trustedintents:0.2'
|
2023-08-30 14:26:12 +02:00
|
|
|
implementation 'org.bouncycastle:bcprov-jdk18on:1.76'
|
2022-04-11 21:09:08 +02:00
|
|
|
implementation "org.simpleflatmapper:sfm-csv:8.2.3"
|
2020-05-24 12:50:11 +02:00
|
|
|
|
2022-02-06 19:00:01 +01:00
|
|
|
androidTestAnnotationProcessor "com.google.dagger:hilt-android-compiler:$hiltVersion"
|
|
|
|
androidTestImplementation "com.google.dagger:hilt-android-testing:$hiltVersion"
|
2022-11-09 15:49:33 +01:00
|
|
|
androidTestImplementation 'androidx.test:core:1.5.0'
|
2023-03-01 13:32:48 +01:00
|
|
|
androidTestImplementation 'androidx.test:runner:1.5.2'
|
2022-11-09 15:49:33 +01:00
|
|
|
androidTestImplementation 'androidx.test:rules:1.5.0'
|
2023-03-01 13:32:48 +01:00
|
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.5.1'
|
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.5.1'
|
2020-12-16 21:44:37 +01:00
|
|
|
androidTestImplementation "junit:junit:${junitVersion}"
|
2022-11-09 15:49:33 +01:00
|
|
|
androidTestUtil 'androidx.test:orchestrator:1.4.2'
|
2020-05-30 13:50:44 +02:00
|
|
|
|
2022-11-09 15:49:33 +01:00
|
|
|
testImplementation 'androidx.test:core:1.5.0'
|
2020-05-24 12:50:11 +02:00
|
|
|
testImplementation "com.google.guava:guava:${guavaVersion}-jre"
|
2020-12-16 21:44:37 +01:00
|
|
|
testImplementation "junit:junit:${junitVersion}"
|
2023-08-30 14:26:12 +02:00
|
|
|
testImplementation 'org.json:json:20230618'
|
|
|
|
testImplementation 'org.robolectric:robolectric:4.10.3'
|
2020-07-12 18:09:50 +02:00
|
|
|
|
2023-08-30 14:26:12 +02:00
|
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
|
2019-09-14 15:20:02 +02:00
|
|
|
}
|