mirror of
https://github.com/TeamAmaze/AmazeFileManager.git
synced 2026-10-17 05:08:00 +08:00
Moved testShared a common module for test classes
Per recommendation for proper source management
This commit is contained in:
+2
-5
@@ -100,10 +100,6 @@ android {
|
||||
includeInBundle = false
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
test.java.srcDirs += '../testShared/src/test/java'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_21
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
@@ -160,7 +156,7 @@ dependencies {
|
||||
ksp libs.androidX.annotation
|
||||
|
||||
//For tests
|
||||
kspTest libs.auto.service
|
||||
testImplementation project(':testShared')
|
||||
testImplementation libs.junit//tests the app logic
|
||||
testImplementation libs.robolectric//tests android interaction
|
||||
testImplementation libs.robolectric.shadows.httpclient//tests android interaction
|
||||
@@ -182,6 +178,7 @@ dependencies {
|
||||
testImplementation libs.kotlin.coroutine.test
|
||||
testImplementation libs.androidX.core.testing
|
||||
testImplementation libs.logback.classic
|
||||
kspTest libs.auto.service
|
||||
|
||||
androidTestImplementation libs.junit //tests the app logic
|
||||
androidTestImplementation libs.androidX.test.expresso
|
||||
|
||||
@@ -26,10 +26,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
test.java.srcDirs += '../testShared/src/test/java'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_21
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
@@ -106,6 +102,7 @@ dependencies {
|
||||
//TODO some libs are not needed
|
||||
|
||||
//For tests
|
||||
testImplementation project(':testShared')
|
||||
testImplementation libs.junit //tests the app logic
|
||||
testImplementation libs.robolectric //tests android interaction
|
||||
testImplementation libs.robolectric.shadows.httpclient //tests android interaction
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ plugins {
|
||||
}
|
||||
include ':file_operations'
|
||||
include ':portscanner'
|
||||
include ':app', ':commons_compress_7z'
|
||||
include ':app', ':commons_compress_7z', ':testShared'
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
namespace "com.amaze.filemanager.test"
|
||||
compileSdkVersion libs.versions.compileSdk.get().toInteger()
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion libs.versions.minSdk.get().toInteger()
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
flavorDimensions = ['static']
|
||||
|
||||
productFlavors {
|
||||
fdroid {
|
||||
dimension 'static'
|
||||
}
|
||||
|
||||
play {
|
||||
dimension 'static'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_21
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests {
|
||||
includeAndroidResources = true
|
||||
returnDefaultValues = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(21)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// App module dependency for accessing app classes
|
||||
implementation project(':app')
|
||||
|
||||
// File operations module for NativeOperations
|
||||
implementation project(':file_operations')
|
||||
|
||||
// Core testing dependencies
|
||||
implementation libs.junit
|
||||
implementation libs.robolectric
|
||||
implementation libs.robolectric.shadows.httpclient
|
||||
implementation libs.androidX.test.core
|
||||
implementation libs.androidX.test.runner
|
||||
implementation libs.androidX.test.rules
|
||||
implementation libs.androidX.test.ext.junit
|
||||
implementation libs.mockito.core
|
||||
implementation libs.androidX.multidex
|
||||
implementation libs.awaitility
|
||||
|
||||
// Kotlin standard library
|
||||
implementation libs.kotlin.stdlib.jdk8
|
||||
|
||||
// MockK for Kotlin mocking
|
||||
implementation libs.mockk
|
||||
|
||||
// RxJava for Completable and reactive types
|
||||
implementation libs.rxjava
|
||||
implementation libs.rxandroid
|
||||
|
||||
// Room for database classes
|
||||
implementation libs.room.runtime
|
||||
|
||||
// SMB for shadow implementations
|
||||
implementation libs.jcifs.ng
|
||||
|
||||
// Android dependencies
|
||||
implementation libs.androidX.appcompat
|
||||
implementation libs.androidX.fragment
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user