mirror of
https://github.com/beemdevelopment/Aegis
synced 2024-09-06 16:03:30 +00:00
190 lines
7.1 KiB
Groovy
190 lines
7.1 KiB
Groovy
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"]) }
|
|
|
|
def packageName = "com.beemdevelopment.aegis"
|
|
def fileProviderAuthority = "${packageName}.fileprovider"
|
|
def fileProviderAuthorityDebug = "${packageName}.debug.fileprovider"
|
|
|
|
android {
|
|
compileSdkVersion 31
|
|
|
|
defaultConfig {
|
|
applicationId "${packageName}"
|
|
minSdkVersion 21
|
|
targetSdkVersion 31
|
|
versionCode 50
|
|
versionName "2.0.2"
|
|
multiDexEnabled true
|
|
buildConfigField "String", "GIT_HASH", "\"${getGitHash()}\""
|
|
buildConfigField "String", "GIT_BRANCH", "\"${getGitBranch()}\""
|
|
|
|
testInstrumentationRunner "com.beemdevelopment.aegis.AegisTestRunner"
|
|
testInstrumentationRunnerArguments clearPackageData: 'true'
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError true
|
|
disable "MissingTranslation"
|
|
checkDependencies true
|
|
}
|
|
|
|
testOptions {
|
|
execution 'ANDROIDX_TEST_ORCHESTRATOR'
|
|
|
|
unitTests {
|
|
all {
|
|
maxHeapSize "3g"
|
|
|
|
ignoreFailures false
|
|
testLogging {
|
|
events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
|
|
showExceptions true
|
|
exceptionFormat "full"
|
|
showCauses true
|
|
showStackTraces true
|
|
}
|
|
}
|
|
|
|
includeAndroidResources true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
manifestPlaceholders = [
|
|
title: "AegisDev",
|
|
iconName: "ic_launcher_debug",
|
|
fileProviderAuthority: "${fileProviderAuthorityDebug}"
|
|
]
|
|
buildConfigField("String", "FILE_PROVIDER_AUTHORITY", "\"${fileProviderAuthorityDebug}\"")
|
|
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",
|
|
fileProviderAuthority: "${fileProviderAuthority}"
|
|
]
|
|
buildConfigField("String", "FILE_PROVIDER_AUTHORITY", "\"${fileProviderAuthority}\"")
|
|
resValue "bool", "pref_secure_screen_default", "true"
|
|
postprocessing {
|
|
removeUnusedCode true
|
|
removeUnusedResources true
|
|
obfuscate false
|
|
optimizeCode true
|
|
proguardFiles getDefaultProguardFile('proguard-defaults.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
targetCompatibility 1.8
|
|
sourceCompatibility 1.8
|
|
coreLibraryDesugaringEnabled true
|
|
}
|
|
}
|
|
|
|
protobuf {
|
|
protoc {
|
|
artifact = 'com.google.protobuf:protoc:3.8.0'
|
|
}
|
|
generateProtoTasks {
|
|
all().each { task ->
|
|
task.builtins {
|
|
java {
|
|
option "lite"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
def androidTestVersion = '1.4.0'
|
|
def cameraxVersion = '1.0.2'
|
|
def glideVersion = '4.12.0'
|
|
def guavaVersion = '31.0.1'
|
|
def junitVersion = '4.13.2'
|
|
def libsuVersion = '3.2.1'
|
|
|
|
annotationProcessor 'androidx.annotation:annotation:1.3.0'
|
|
annotationProcessor "com.github.bumptech.glide:compiler:${glideVersion}"
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
|
implementation "androidx.biometric:biometric:1.1.0"
|
|
implementation "androidx.camera:camera-camera2:$cameraxVersion"
|
|
implementation "androidx.camera:camera-lifecycle:$cameraxVersion"
|
|
implementation "androidx.camera:camera-view:1.1.0-beta01"
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
implementation "androidx.core:core:1.7.0"
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
|
implementation "androidx.lifecycle:lifecycle-process:2.4.0"
|
|
implementation 'androidx.preference:preference:1.2.0'
|
|
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
|
implementation "androidx.viewpager2:viewpager2:1.0.0"
|
|
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
|
implementation 'com.github.avito-tech:krop:0.52'
|
|
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.5.0'
|
|
implementation 'com.google.protobuf:protobuf-javalite:3.19.4'
|
|
implementation 'com.google.zxing:core:3.4.1'
|
|
implementation "com.mikepenz:iconics-core:3.2.5"
|
|
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.5@aar'
|
|
implementation 'com.nulab-inc:zxcvbn:1.5.2'
|
|
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
|
implementation 'de.psdev.licensesdialog:licensesdialog:2.2.0'
|
|
// NOTE: this is kept at an old version on purpose (something in newer versions breaks the Authenticator Plus importer)
|
|
implementation 'net.lingala.zip4j:zip4j:2.6.0'
|
|
implementation 'info.guardianproject.trustedintents:trustedintents:0.2'
|
|
implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
|
|
|
|
androidTestImplementation "androidx.test:core:${androidTestVersion}"
|
|
androidTestImplementation "androidx.test:runner:${androidTestVersion}"
|
|
androidTestImplementation "androidx.test:rules:${androidTestVersion}"
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
|
|
androidTestImplementation "junit:junit:${junitVersion}"
|
|
androidTestUtil 'androidx.test:orchestrator:1.4.1'
|
|
|
|
testImplementation "androidx.test:core:${androidTestVersion}"
|
|
testImplementation "com.google.guava:guava:${guavaVersion}-jre"
|
|
testImplementation "junit:junit:${junitVersion}"
|
|
testImplementation "org.json:json:20211205"
|
|
testImplementation 'org.robolectric:robolectric:4.7.3'
|
|
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
|
|
}
|