mirror of
https://github.com/TeamAmaze/AmazeFileManager.git
synced 2026-10-17 05:08:00 +08:00
cea297dc5e
Signed-off-by: VishnuSanal <t.v.s10123@gmail.com>
341 lines
11 KiB
Groovy
341 lines
11 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-kapt'
|
|
apply plugin: 'kotlin-parcelize'
|
|
apply plugin: "com.mxalbert.gradle.jacoco-android"
|
|
apply plugin: "com.starter.easylauncher"
|
|
apply plugin: 'com.google.devtools.ksp'
|
|
|
|
android {
|
|
namespace "com.amaze.filemanager"
|
|
compileSdk libs.versions.compileSdk.get().toInteger()
|
|
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', 'META-INF/versions/9/OSGI-INF/MANIFEST.MF']
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.amaze.filemanager"
|
|
minSdkVersion libs.versions.minSdk.get().toInteger()
|
|
targetSdkVersion libs.versions.targetSdk.get().toInteger()
|
|
versionCode 125
|
|
versionName "3.11.3"
|
|
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
|
|
enableUnitTestCoverage true
|
|
}
|
|
|
|
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
|
|
buildConfig 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
|
|
}
|
|
}
|
|
|
|
dependenciesInfo {
|
|
// Disables dependency metadata when building APKs.
|
|
includeInApk = false
|
|
// Disables dependency metadata when building Android App Bundles.
|
|
includeInBundle = false
|
|
}
|
|
|
|
sourceSets {
|
|
test.java.srcDirs += '../testShared/src/test/java'
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
returnDefaultValues = true
|
|
}
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
modules {
|
|
module("org.bouncycastle:bcprov-jdk15on") {
|
|
replacedBy("org.bouncycastle:bcprov-jdk18on")
|
|
}
|
|
module("org.bouncycastle:bcpkix-jdk15on") {
|
|
replacedBy("org.bouncycastle:bcpkix-jdk18on")
|
|
}
|
|
module("org.bouncycastle:bcprov-jdk15to18") {
|
|
replacedBy("org.bouncycastle:bcprov-jdk18on")
|
|
}
|
|
module("org.bouncycastle:bcpkix-jdk15to18") {
|
|
replacedBy("org.bouncycastle:bcpkix-jdk18on")
|
|
}
|
|
}
|
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation libs.systembarTint
|
|
|
|
implementation libs.androidX.vectordrawable.animated
|
|
implementation libs.androidX.legacySupportV13
|
|
implementation libs.androidX.material
|
|
implementation libs.androidX.fragment
|
|
implementation libs.androidX.appcompat
|
|
implementation libs.androidX.preference
|
|
implementation libs.androidX.core
|
|
implementation libs.androidX.palette
|
|
implementation libs.androidX.cardview
|
|
implementation libs.androidX.constraintLayout
|
|
implementation libs.androidX.multidex //Multiple dex files
|
|
implementation libs.androidX.biometric
|
|
implementation libs.room.runtime
|
|
implementation libs.room.rxjava2
|
|
|
|
ksp libs.room.compiler
|
|
ksp libs.androidX.annotation
|
|
|
|
//For tests
|
|
testImplementation libs.junit//tests the app logic
|
|
testImplementation libs.robolectric//tests android interaction
|
|
testImplementation libs.robolectric.shadows.httpclient//tests android interaction
|
|
testImplementation libs.androidX.test.core
|
|
testImplementation libs.androidX.test.runner
|
|
testImplementation libs.androidX.test.rules
|
|
testImplementation libs.androidX.test.ext.junit
|
|
testImplementation libs.androidX.fragment.testing
|
|
testImplementation libs.mockito.core
|
|
testImplementation libs.mockito.inline
|
|
testImplementation libs.mockito.kotlin
|
|
testImplementation libs.apache.sshd
|
|
testImplementation libs.awaitility
|
|
testImplementation libs.jsoup
|
|
testImplementation libs.room.migration
|
|
testImplementation libs.mockk
|
|
testImplementation libs.kotlin.coroutine.test
|
|
testImplementation libs.androidX.core.testing
|
|
kspTest libs.auto.service
|
|
testImplementation 'ch.qos.logback:logback-classic:1.4.14'
|
|
|
|
androidTestImplementation libs.junit //tests the app logic
|
|
androidTestImplementation libs.androidX.test.expresso
|
|
androidTestImplementation libs.androidX.test.core
|
|
androidTestImplementation libs.androidX.test.runner
|
|
androidTestImplementation libs.androidX.test.rules
|
|
androidTestImplementation libs.androidX.test.ext.junit
|
|
androidTestImplementation libs.androidX.test.uiautomator
|
|
androidTestImplementation libs.androidX.fragment.testing
|
|
androidTestImplementation libs.commons.net
|
|
androidTestImplementation libs.awaitility
|
|
|
|
//Detect memory leaks
|
|
debugImplementation libs.leakcanary.android
|
|
|
|
implementation libs.commons.compress
|
|
|
|
implementation libs.materialdialogs.core
|
|
implementation libs.materialdialogs.commons
|
|
|
|
implementation libs.apache.mina.core
|
|
implementation libs.apache.ftpserver.ftplet.api
|
|
implementation libs.apache.ftpserver.core
|
|
|
|
implementation libs.libsu.core
|
|
implementation libs.libsu.io
|
|
|
|
playImplementation libs.cloudrail.si.android
|
|
playImplementation libs.junrar
|
|
playImplementation libs.google.play.billing
|
|
|
|
implementation libs.mpAndroidChart//Nice charts and graphs
|
|
|
|
implementation libs.concurrent.trees//Concurrent tries
|
|
|
|
//SFTP
|
|
implementation libs.sshj
|
|
//smb
|
|
implementation libs.jcifs.ng
|
|
//FTP
|
|
implementation libs.commons.net
|
|
//OkHttp
|
|
implementation libs.okhttp
|
|
|
|
implementation libs.bcpkix.jdk18on
|
|
implementation libs.bcprov.jdk18on
|
|
|
|
//Glide: loads icons seemlessly
|
|
implementation libs.glide
|
|
implementation (libs.glide.recyclerView) {
|
|
// Excludes the support library because it's already included by Glide.
|
|
transitive = false
|
|
}
|
|
ksp libs.glide.ksp
|
|
|
|
implementation libs.speedDial
|
|
|
|
//Simple library show
|
|
implementation(libs.aboutLibraries) {
|
|
transitive = true
|
|
}
|
|
|
|
//zip4j: support password-protected zips
|
|
implementation libs.zip4j
|
|
|
|
implementation libs.xz
|
|
|
|
implementation libs.rxandroid
|
|
// 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 libs.rxjava
|
|
|
|
implementation project(':commons_compress_7z')
|
|
implementation project(':file_operations')
|
|
implementation project(':portscanner')
|
|
|
|
implementation libs.kotlin.stdlib.jdk8
|
|
implementation libs.acra.core
|
|
implementation libs.slf4j.api
|
|
implementation libs.logback.android
|
|
testImplementation libs.logback.classic
|
|
|
|
implementation libs.gson
|
|
implementation libs.amaze.trashBin
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
configurations.configureEach {
|
|
resolutionStrategy {
|
|
dependencySubstitution {
|
|
substitute module("commons-logging:commons-logging-api:1.1") using module("commons-logging:commons-logging:1.1.1")
|
|
substitute module("com.android.support:support-annotations:27.1.1") using 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') using module("org.hamcrest:hamcrest:2.1")
|
|
substitute module('org.hamcrest:hamcrest-library:1.3') using module("org.hamcrest:hamcrest:2.1")
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations.testImplementation {
|
|
exclude module: 'logback-android'
|
|
}
|
|
|
|
tasks.register('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
|
|
rootProject.tasks.named('spotlessJava').configure { dependsOn copyTask }
|
|
rootProject.tasks.named('spotlessKotlin').configure { dependsOn copyTask }
|
|
}
|
|
|
|
project.afterEvaluate {
|
|
preBuild.dependsOn supportOldLangCodes
|
|
}
|
|
|
|
clean.dependsOn supportOldLangCodes
|
|
clean.mustRunAfter supportOldLangCodes
|
|
|
|
jacoco {
|
|
toolVersion = libs.versions.jacoco.get()
|
|
}
|
|
|
|
tasks.withType(Test).configureEach {
|
|
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 {
|
|
google()
|
|
mavenCentral()
|
|
maven { url "https://jitpack.io" }
|
|
maven { url "https://jcenter.bintray.com" }
|
|
}
|