mirror of
https://github.com/TeamAmaze/AmazeFileManager.git
synced 2026-10-17 05:08:00 +08:00
45676fbb0d
Amaze still uses Java in many places, expect ugly code here and there. Additionally, as of material-dialogs 3.3.0 they don't have the Theme class anymore, nor they allow specifying dialog themes in code. Beware.
305 lines
11 KiB
Groovy
305 lines
11 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.akaita.android.easylauncher'
|
|
|
|
android {
|
|
compileSdkVersion 29
|
|
|
|
dexOptions {
|
|
jumboMode = true
|
|
javaMaxHeapSize "4g"
|
|
}
|
|
|
|
packagingOptions {
|
|
exclude 'proguard-project.txt'
|
|
exclude 'project.properties'
|
|
exclude 'META-INF/LICENSE.txt'
|
|
exclude 'META-INF/LICENSE'
|
|
exclude 'META-INF/NOTICE.txt'
|
|
exclude 'META-INF/NOTICE'
|
|
exclude 'META-INF/DEPENDENCIES.txt'
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.amaze.filemanager"
|
|
minSdkVersion 16
|
|
targetSdkVersion 29
|
|
versionCode 94
|
|
versionName "3.6.0"
|
|
multiDexEnabled true
|
|
|
|
vectorDrawables.useSupportLibrary = true
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
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\""
|
|
}
|
|
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
|
|
buildConfigField "String", "CRYPTO_IV", "\"LxbHiJhhUXcj\""
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
flavorDimensions 'static'
|
|
|
|
productFlavors {
|
|
fdroid {
|
|
dimension 'static'
|
|
buildConfigField "boolean", "IS_VERSION_FDROID", "true"
|
|
}
|
|
|
|
play {
|
|
dimension 'static'
|
|
buildConfigField "boolean", "IS_VERSION_FDROID", "false"
|
|
signingConfig signingConfigs.config
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
returnDefaultValues = true
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
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"
|
|
implementation "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:1.1.0'
|
|
|
|
implementation "androidx.preference:preference:$androidXPrefVersion"
|
|
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 'androidx.test.uiautomator:uiautomator:2.2.0'
|
|
testImplementation "org.mockito:mockito-core:$mockitoVersion"
|
|
testImplementation "org.mockito:mockito-inline:$mockitoVersion"
|
|
testImplementation "org.apache.sshd:sshd-core:1.7.0"
|
|
testImplementation "org.awaitility:awaitility:$awaitilityVersion"
|
|
testImplementation 'org.jsoup:jsoup:1.11.2'
|
|
testImplementation 'commons-net:commons-net:3.6'
|
|
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 'commons-net:commons-net:3.6'
|
|
androidTestImplementation "org.awaitility:awaitility:$awaitilityVersion"
|
|
|
|
//Detect memory leaks
|
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.6'
|
|
|
|
implementation 'org.apache.commons:commons-compress:1.18'
|
|
|
|
implementation "com.github.junrar:junrar:$junrarVersion"
|
|
|
|
implementation "com.afollestad.material-dialogs:core:$materialDialogsVersion"
|
|
implementation "com.afollestad.material-dialogs:input:$materialDialogsVersion"
|
|
implementation "com.afollestad.material-dialogs:files:$materialDialogsVersion"
|
|
implementation "com.afollestad.material-dialogs:color:$materialDialogsVersion"
|
|
implementation "com.afollestad.material-dialogs:bottomsheets:$materialDialogsVersion"
|
|
|
|
// https://mvnrepository.com/artifact/org.apache.mina/mina-core
|
|
|
|
implementation group: 'org.apache.mina', name: 'mina-core', version: '2.0.16'
|
|
// https://mvnrepository.com/artifact/org.slf4j/slf4j-api
|
|
implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
|
|
// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
|
|
implementation group: 'org.slf4j', name: 'slf4j-android', version: slf4jVersion
|
|
// https://mvnrepository.com/artifact/org.slf4j/jcl-over-slf4j
|
|
implementation group: 'org.slf4j', name: 'jcl-over-slf4j', version: slf4jVersion
|
|
|
|
//implementation files('libs/ftplet-api-1.1.0-SNAPSHOT.jar')
|
|
// https://mvnrepository.com/artifact/org.apache.ftpserver/ftplet-api
|
|
implementation group: 'org.apache.ftpserver', name: 'ftplet-api', version: '1.1.0'
|
|
|
|
//implementation files('libs/ftpserver-core-1.1.0-SNAPSHOT.jar')
|
|
// https://mvnrepository.com/artifact/org.apache.ftpserver/ftpserver-core
|
|
implementation group: 'org.apache.ftpserver', name: 'ftpserver-core', version: '1.1.0'
|
|
|
|
implementation 'org.greenrobot:eventbus:3.1.1'
|
|
|
|
implementation 'com.android.volley:volley:1.1.1'
|
|
|
|
implementation 'eu.chainfire:libsuperuser:1.0.0.+'
|
|
|
|
implementation '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"
|
|
|
|
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.8'
|
|
|
|
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
|
// 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 group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.1.1'
|
|
|
|
implementation project(':commons_compress_7z')
|
|
implementation project(':file_operations')
|
|
implementation "androidx.core:core-ktx:$kotlin_version"
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
implementation "ch.acra:acra-core:5.7.0"
|
|
}
|
|
|
|
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")
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
|
|
easylauncher {
|
|
foregroundIconNames "@mipmap/ic_launcher_foreground" // Foreground of adaptive launcher icon
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = "${jacocoVersion}"
|
|
}
|
|
|
|
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()
|
|
}
|