mirror of
https://github.com/TeamAmaze/AmazeFileManager.git
synced 2026-10-17 05:08:00 +08:00
83f618411d
To fix missing Volley dependency caused by #3872 when #3704 was still depends on Volley
336 lines
12 KiB
Groovy
336 lines
12 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-kapt'
|
|
apply plugin: 'kotlin-parcelize'
|
|
apply plugin: 'com.hiya.jacoco-android'
|
|
apply plugin: "com.starter.easylauncher"
|
|
|
|
android {
|
|
compileSdkVersion 31
|
|
packagingOptions {
|
|
resources {
|
|
excludes += ['proguard-project.txt', 'project.properties', 'META-INF/LICENSE.txt', 'META-INF/LICENSE', 'META-INF/NOTICE.txt', 'META-INF/NOTICE', 'META-INF/DEPENDENCIES.txt', 'META-INF/DEPENDENCIES']
|
|
}
|
|
}
|
|
|
|
|
|
defaultConfig {
|
|
applicationId "com.amaze.filemanager"
|
|
minSdkVersion 19
|
|
targetSdkVersion 31
|
|
versionCode 118
|
|
versionName "3.8.5"
|
|
multiDexEnabled true
|
|
|
|
vectorDrawables.useSupportLibrary = true
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments += ["room.schemaLocation" : "$projectDir/src/test/resources/schemas".toString(),
|
|
"room.incremental" : "true",
|
|
"room.expandProjection": "true"]
|
|
}
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
release
|
|
config
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
applicationIdSuffix ".debug"
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
|
|
testProguardFile 'tests-proguard.cfg'
|
|
buildConfigField "String", "CRYPTO_IV", "\"LxbHiJhhUXcj\""
|
|
buildConfigField "String", "FTP_SERVER_KEYSTORE_PASSWORD", "\"vishal007\""
|
|
debuggable true //For "debug" banner on icon
|
|
}
|
|
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
|
|
buildConfigField "String", "CRYPTO_IV", "\"LxbHiJhhUXcj\""
|
|
buildConfigField "String", "FTP_SERVER_KEYSTORE_PASSWORD", "\"vishal007\""
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
|
|
|
|
flavorDimensions 'static'
|
|
|
|
productFlavors {
|
|
fdroid {
|
|
dimension 'static'
|
|
buildConfigField "boolean", "IS_VERSION_FDROID", "true"
|
|
}
|
|
|
|
play {
|
|
dimension 'static'
|
|
buildConfigField "boolean", "IS_VERSION_FDROID", "false"
|
|
signingConfig signingConfigs.config
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
test.java.srcDirs += '../testShared/src/test/java'
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
useIR = true
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
returnDefaultValues = true
|
|
}
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
modules {
|
|
module("org.bouncycastle:bcprov-jdk15to18") {
|
|
replacedBy("org.bouncycastle:bcprov-jdk15on")
|
|
}
|
|
module("org.bouncycastle:bcpkix-jdk15to18") {
|
|
replacedBy("org.bouncycastle:bcpkix-jdk15on")
|
|
}
|
|
}
|
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'
|
|
|
|
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
|
|
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
|
implementation "com.google.android.material:material:$androidMaterialVersion"
|
|
implementation "androidx.fragment:fragment-ktx:$androidXFragmentVersion"
|
|
implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
|
|
implementation 'androidx.palette:palette-ktx:1.0.0'
|
|
implementation 'androidx.cardview:cardview:1.0.0'
|
|
implementation "androidx.room:room-runtime:$roomVersion"
|
|
playImplementation "com.android.billingclient:billing:$androidBillingVersion"
|
|
kapt "androidx.room:room-compiler:$roomVersion"
|
|
// RxJava support for Room
|
|
implementation "androidx.room:room-rxjava2:$roomVersion"
|
|
kapt "androidx.annotation:annotation:$androidXAnnotationVersion"
|
|
|
|
implementation "androidx.preference:preference-ktx:$androidXPrefVersion"
|
|
|
|
//For tests
|
|
testImplementation "junit:junit:$junitVersion"//tests the app logic
|
|
testImplementation "org.robolectric:robolectric:$robolectricVersion"//tests android interaction
|
|
testImplementation "org.robolectric:shadows-httpclient:$robolectricVersion"//tests android interaction
|
|
testImplementation "androidx.test:core:$androidXTestVersion"
|
|
testImplementation "androidx.test:runner:$androidXTestVersion"
|
|
testImplementation "androidx.test:rules:$androidXTestVersion"
|
|
testImplementation "androidx.test.ext:junit:$androidXTestExtVersion"
|
|
testImplementation "org.mockito:mockito-core:$mockitoVersion"
|
|
testImplementation "org.mockito:mockito-inline:$mockitoVersion"
|
|
testImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
|
|
testImplementation "org.apache.sshd:sshd-core:1.7.0"
|
|
testImplementation "org.awaitility:awaitility:$awaitilityVersion"
|
|
testImplementation "org.jsoup:jsoup:$jsoupVersion"
|
|
testImplementation "androidx.room:room-migration:$roomVersion"
|
|
testImplementation "io.mockk:mockk:$mockkVersion"
|
|
kaptTest "com.google.auto.service:auto-service:1.0-rc4"
|
|
|
|
androidTestImplementation "junit:junit:$junitVersion"//tests the app logic
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
|
|
androidTestImplementation "androidx.test:core:$androidXTestVersion"
|
|
androidTestImplementation "androidx.test:runner:$androidXTestVersion"
|
|
androidTestImplementation "androidx.test:rules:$androidXTestVersion"
|
|
androidTestImplementation "androidx.test.ext:junit:$androidXTestExtVersion"
|
|
// androidTestImplementation "androidx.test.uiautomator:uiautomator:$uiAutomatorVersion"
|
|
androidTestImplementation "commons-net:commons-net:$commonsNetVersion"
|
|
androidTestImplementation "org.awaitility:awaitility:$awaitilityVersion"
|
|
|
|
//Detect memory leaks
|
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
|
|
|
|
implementation "org.apache.commons:commons-compress:$commonsCompressVersion"
|
|
|
|
playImplementation "com.github.junrar:junrar:$junrarVersion"
|
|
|
|
implementation "com.afollestad.material-dialogs:core:$materialDialogsVersion"
|
|
implementation "com.afollestad.material-dialogs:commons:$materialDialogsVersion"
|
|
|
|
// https://mvnrepository.com/artifact/org.apache.mina/mina-core
|
|
implementation group: 'org.apache.mina', name: 'mina-core', version: '2.0.16'
|
|
|
|
//implementation files('libs/ftplet-api-1.1.0-SNAPSHOT.jar')
|
|
// https://mvnrepository.com/artifact/org.apache.ftpserver/ftplet-api
|
|
implementation "org.apache.ftpserver:ftplet-api:$ftpserverVersion"
|
|
|
|
//implementation files('libs/ftpserver-core-1.1.0-SNAPSHOT.jar')
|
|
// https://mvnrepository.com/artifact/org.apache.ftpserver/ftpserver-core
|
|
implementation "org.apache.ftpserver:ftpserver-core:$ftpserverVersion"
|
|
|
|
implementation 'org.greenrobot:eventbus:3.3.1'
|
|
|
|
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
|
|
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}"
|
|
|
|
playImplementation 'com.cloudrail:cloudrail-si-android:2.22.4'
|
|
|
|
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'//Nice charts and graphs
|
|
|
|
implementation 'com.github.npgall:concurrent-trees:2.6.1'//Concurrent tries
|
|
|
|
//SFTP
|
|
implementation "com.hierynomus:sshj:$sshjVersion"
|
|
|
|
//smb
|
|
implementation "eu.agno3.jcifs:jcifs-ng:$jcifsVersion"
|
|
|
|
//FTP
|
|
implementation "commons-net:commons-net:$commonsNetVersion"
|
|
|
|
//OkHttp
|
|
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
|
|
|
|
implementation "org.bouncycastle:bcpkix-jdk15on:$bouncyCastleVersion"
|
|
implementation "org.bouncycastle:bcprov-jdk15on:$bouncyCastleVersion"
|
|
|
|
//Glide: loads icons seemlessly
|
|
implementation "com.github.bumptech.glide:glide:$glideVersion"
|
|
implementation ("com.github.bumptech.glide:recyclerview-integration:$glideVersion") {
|
|
// Excludes the support library because it's already included by Glide.
|
|
transitive = false
|
|
}
|
|
kapt "com.github.bumptech.glide:compiler:$glideVersion"
|
|
|
|
implementation "com.leinardi.android:speed-dial:$fabSpeedDialVersion"
|
|
|
|
//Simple library show
|
|
implementation('com.mikepenz:aboutlibraries:6.1.1@aar') {
|
|
transitive = true
|
|
}
|
|
|
|
implementation 'androidx.multidex:multidex:2.0.1'//Multiple dex files
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
|
|
//zip4j: support password-protected zips
|
|
implementation "net.lingala.zip4j:zip4j:$zip4jVersion"
|
|
|
|
implementation 'org.tukaani:xz:1.9'
|
|
|
|
implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
|
|
// Because RxAndroid releases are few and far between, it is recommended you also
|
|
// explicitly depend on RxJava's latest version for bug fixes and new features.
|
|
// (see https://github.com/ReactiveX/RxJava/releases for latest 3.x.x version)
|
|
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
|
|
|
|
implementation project(':commons_compress_7z')
|
|
implementation project(':file_operations')
|
|
implementation project(':portscanner')
|
|
implementation "androidx.core:core-ktx:$androidXCoreVersion"
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation "ch.acra:acra-core:5.7.0"
|
|
runtimeOnly 'org.slf4j:slf4j-api:1.7.36'
|
|
runtimeOnly "com.github.tony19:logback-android:$logbackAndroidVersion"
|
|
|
|
implementation 'com.google.code.gson:gson:2.9.1'
|
|
|
|
}
|
|
|
|
configurations.all {
|
|
resolutionStrategy {
|
|
dependencySubstitution {
|
|
substitute module("commons-logging:commons-logging-api:1.1") with module("commons-logging:commons-logging:1.1.1")
|
|
substitute module("com.android.support:support-annotations:27.1.1") with module("com.android.support:support-annotations:27.0.2")
|
|
// These two lines are added to prevent possible class clashes between awaitility (which uses hamcrest 2.1) and junit (which uses hamcrest 1.3).
|
|
substitute module('org.hamcrest:hamcrest-core:1.3') with module("org.hamcrest:hamcrest:2.1")
|
|
substitute module('org.hamcrest:hamcrest-library:1.3') with module("org.hamcrest:hamcrest:2.1")
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations.all { config ->
|
|
// This workarounds logback's multiple bindings problem when running tests.
|
|
if (config.name.toLowerCase().contains('test')) {
|
|
config.resolutionStrategy.dependencySubstitution {
|
|
substitute module("com.github.tony19:logback-android:$logbackAndroidVersion") with module("ch.qos.logback:logback-classic:1.2.9")
|
|
}
|
|
}
|
|
}
|
|
|
|
task supportOldLangCodes
|
|
|
|
[['id', 'in'], ['yi', 'ji'], ['he', 'iw']].forEach { sourceCode, destinationCode ->
|
|
def copyTask = tasks.create('copyStrings' + sourceCode + 'Into' + destinationCode, Copy) {
|
|
description('copying values-' + sourceCode + ' strings into values-' + destinationCode)
|
|
from('src/main/res/values-' + sourceCode)
|
|
into('src/main/res/values-' + destinationCode)
|
|
include('strings.xml')
|
|
}
|
|
supportOldLangCodes.dependsOn copyTask
|
|
}
|
|
|
|
project.afterEvaluate {
|
|
preBuild.dependsOn supportOldLangCodes
|
|
}
|
|
|
|
clean.dependsOn supportOldLangCodes
|
|
clean.mustRunAfter supportOldLangCodes
|
|
|
|
jacoco {
|
|
toolVersion = "${jacocoVersion}"
|
|
}
|
|
|
|
jacocoAndroidUnitTestReport {
|
|
html.enabled true
|
|
xml.enabled true
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
jacoco.includeNoLocationClasses = true
|
|
jacoco.excludes = ['jdk.internal.*']
|
|
}
|
|
|
|
|
|
Properties props = new Properties()
|
|
def propFile = new File('signing.properties')
|
|
|
|
if (propFile.canRead()) {
|
|
props.load(new FileInputStream(propFile))
|
|
|
|
if (props != null &&
|
|
props.containsKey('STORE_FILE') &&
|
|
props.containsKey('STORE_PASSWORD') &&
|
|
props.containsKey('KEY_ALIAS') &&
|
|
props.containsKey('KEY_PASSWORD')) {
|
|
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
|
|
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
|
|
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
|
|
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
|
|
} else {
|
|
println 'signing.properties found but some entries are missing'
|
|
android.buildTypes.release.signingConfig = null
|
|
}
|
|
} else {
|
|
println 'signing.properties not found'
|
|
android.buildTypes.release.signingConfig = null
|
|
}
|
|
repositories {
|
|
mavenCentral()
|
|
}
|