Skip to content

Commit

Permalink
Merge 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
VishalNehra committed Apr 18, 2024
2 parents 1edfe54 + 648230e commit e3ccaa5
Show file tree
Hide file tree
Showing 19 changed files with 401 additions and 243 deletions.
223 changes: 115 additions & 108 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
apply plugin: 'com.hiya.jacoco-android'
apply plugin: "com.starter.easylauncher"
apply plugin: 'com.google.devtools.ksp'

android {
namespace "com.amaze.filemanager"
compileSdk 33
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']
Expand All @@ -17,8 +18,8 @@ android {

defaultConfig {
applicationId "com.amaze.filemanager"
minSdkVersion 19
targetSdkVersion 33
minSdkVersion libs.versions.minSdk.get().toInteger()
targetSdkVersion libs.versions.targetSdk.get().toInteger()
versionCode 121
versionName "3.10"
multiDexEnabled true
Expand Down Expand Up @@ -49,6 +50,7 @@ android {
buildConfigField "String", "CRYPTO_IV", "\"LxbHiJhhUXcj\""
buildConfigField "String", "FTP_SERVER_KEYSTORE_PASSWORD", "\"vishal007\""
debuggable true //For "debug" banner on icon
enableUnitTestCoverage true
}

release {
Expand All @@ -63,6 +65,7 @@ android {

buildFeatures {
viewBinding true
buildConfig true
}

flavorDimensions = ['static']
Expand All @@ -80,6 +83,13 @@ android {
}
}

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'
}
Expand Down Expand Up @@ -107,154 +117,148 @@ android {
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-jdk15on")
replacedBy("org.bouncycastle:bcprov-jdk18on")
}
module("org.bouncycastle:bcpkix-jdk15to18") {
replacedBy("org.bouncycastle:bcpkix-jdk15on")
replacedBy("org.bouncycastle:bcpkix-jdk18on")
}
}

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"
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.room.runtime
implementation libs.room.rxjava2

ksp libs.room.compiler
ksp libs.androidX.annotation

//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:$androidXTestRunnerVersion"
testImplementation "androidx.test:rules:$androidXTestVersion"
testImplementation "androidx.test.ext:junit:$androidXTestExtVersion"
testImplementation "androidx.fragment:fragment-testing:$androidXFragmentVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "org.mockito:mockito-inline:$mockitoInlineVersion"
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"
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutineTestVersion"
testImplementation "androidx.arch.core:core-testing:$androidXArchCoreTestVersion"
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'
kaptTest "com.google.auto.service:auto-service:1.1.1"

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 "androidx.fragment:fragment-testing:$androidXFragmentVersion"
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"
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

playImplementation "com.github.junrar:junrar:$junrarVersion"

implementation "com.afollestad.material-dialogs:core:$materialDialogsVersion"
implementation "com.afollestad.material-dialogs:commons:$materialDialogsVersion"
//Detect memory leaks
debugImplementation libs.leakcanary.android

// https://mvnrepository.com/artifact/org.apache.mina/mina-core
implementation group: 'org.apache.mina', name: 'mina-core', version: '2.0.16'
implementation libs.commons.compress

//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 libs.materialdialogs.core
implementation libs.materialdialogs.commons

//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 libs.apache.mina.core
implementation libs.apache.ftpserver.ftplet.api
implementation libs.apache.ftpserver.core

implementation 'org.greenrobot:eventbus:3.3.1'
implementation libs.eventbus

implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"
implementation "com.github.topjohnwu.libsu:io:${libsuVersion}"
implementation libs.libsu.core
implementation libs.libsu.io

playImplementation 'com.cloudrail:cloudrail-si-android:2.22.4'
playImplementation libs.cloudrail.si.android
playImplementation libs.junrar
playImplementation libs.google.play.billing

implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'//Nice charts and graphs
implementation libs.mpAndroidChart//Nice charts and graphs

implementation 'com.github.npgall:concurrent-trees:2.6.1'//Concurrent tries
implementation libs.concurrent.trees//Concurrent tries

//SFTP
implementation "com.hierynomus:sshj:$sshjVersion"

implementation libs.sshj
//smb
implementation "eu.agno3.jcifs:jcifs-ng:$jcifsVersion"

implementation libs.jcifs.ng
//FTP
implementation "commons-net:commons-net:$commonsNetVersion"

implementation libs.commons.net
//OkHttp
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
implementation libs.okhttp

implementation "org.bouncycastle:bcpkix-jdk15on:$bouncyCastleVersion"
implementation "org.bouncycastle:bcprov-jdk15on:$bouncyCastleVersion"
implementation libs.bcpkix.jdk18on
implementation libs.bcprov.jdk18on

//Glide: loads icons seemlessly
implementation "com.github.bumptech.glide:glide:$glideVersion"
implementation ("com.github.bumptech.glide:recyclerview-integration:$glideVersion") {
implementation libs.glide
implementation (libs.glide.recyclerView) {
// Excludes the support library because it's already included by Glide.
transitive = false
}
kapt "com.github.bumptech.glide:compiler:$glideVersion"
ksp libs.glide.ksp

implementation "com.leinardi.android:speed-dial:$fabSpeedDialVersion"
implementation libs.speedDial

//Simple library show
implementation('com.mikepenz:aboutlibraries:6.1.1@aar') {
implementation(libs.aboutLibraries) {
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 libs.zip4j

implementation 'org.tukaani:xz:1.9'
implementation libs.xz

implementation "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
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 "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
implementation libs.rxjava

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"
implementation 'org.slf4j:slf4j-api:2.0.7'
implementation "com.github.tony19:logback-android:$logbackAndroidVersion"
testImplementation 'ch.qos.logback:logback-classic:1.2.11'

implementation 'com.google.code.gson:gson:2.9.1'
implementation 'com.github.TeamAmaze:AmazeTrashBin:1.0.10'

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 {
Expand Down Expand Up @@ -297,12 +301,15 @@ clean.dependsOn supportOldLangCodes
clean.mustRunAfter supportOldLangCodes

jacoco {
toolVersion = "${jacocoVersion}"
toolVersion = libs.versions.jacoco.get()
}

jacocoAndroidUnitTestReport {
html.enabled true
xml.enabled true
tasks.withType(JacocoReport).configureEach {
reports {
csv.required.set(false)
html.required.set(true)
xml.required.set(true)
}
}

tasks.withType(Test).configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class CryptUtilEspressoTest {
CryptUtil(
AppConfig.getInstance(),
HybridFileParcelable(targetFile.absolutePath).also {
it.size = targetFile.length()
it.setSize(targetFile.length())
},
Environment.getExternalStorageDirectory().absolutePath,
ProgressHandler(),
Expand Down Expand Up @@ -136,7 +136,7 @@ class CryptUtilEspressoTest {
CryptUtil(
AppConfig.getInstance(),
HybridFileParcelable(targetFile.absolutePath).also {
it.size = targetFile.length()
it.setSize(targetFile.length())
},
Environment.getExternalStorageDirectory().absolutePath,
ProgressHandler(),
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
android:requestLegacyExternalStorage="true"
android:banner="@drawable/about_header"
android:localeConfig="@xml/locales_config"
android:usesCleartextTraffic="true">
android:networkSecurityConfig="@xml/network_security_config">

<activity
android:exported="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.ArrayList;
import java.util.List;

import com.amaze.filemanager.GlideApp;
import com.amaze.filemanager.R;
import com.amaze.filemanager.adapters.data.CompressedObjectParcelable;
import com.amaze.filemanager.adapters.holders.CompressedItemViewHolder;
Expand All @@ -39,6 +38,7 @@
import com.amaze.filemanager.ui.views.CircleGradientDrawable;
import com.amaze.filemanager.utils.AnimUtils;
import com.amaze.filemanager.utils.Utils;
import com.bumptech.glide.Glide;

import android.app.Activity;
import android.content.Context;
Expand Down Expand Up @@ -240,17 +240,15 @@ public void onBindViewHolder(final CompressedItemViewHolder holder, int position
compressedExplorerFragment.getResources().getDisplayMetrics()));

if (rowItem.type == CompressedObjectParcelable.TYPE_GOBACK) {
GlideApp.with(compressedExplorerFragment)
Glide.with(compressedExplorerFragment)
.load(R.drawable.ic_arrow_left_white_24dp)
.into(holder.genericIcon);
gradientDrawable.setColor(Utils.getColor(context, R.color.goback_item));
holder.txtTitle.setText("..");
holder.txtDesc.setText("");
holder.date.setText(R.string.goback);
} else {
GlideApp.with(compressedExplorerFragment)
.load(rowItem.iconData.image)
.into(holder.genericIcon);
Glide.with(compressedExplorerFragment).load(rowItem.iconData.image).into(holder.genericIcon);

if (compressedExplorerFragment.showLastModified)
holder.date.setText(Utils.getDate(context, rowItem.date));
Expand Down
Loading

0 comments on commit e3ccaa5

Please sign in to comment.