Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2c88a4e
configure all tests to use junit4
DeleMike May 5, 2025
4f2ea7a
test(AboutUtil): add unit tests for AboutUtil composables and non-UI …
DeleMike May 5, 2025
8253514
add license header
DeleMike May 5, 2025
e2ca905
Merge remote-tracking branch 'origin/main' into feat/write-test-fns-f…
DeleMike May 17, 2025
e2a960e
Merge remote-tracking branch 'origin/main' into feat/write-test-fns-f…
DeleMike May 17, 2025
a4c4ff1
Merge remote-tracking branch 'origin/main' into feat/write-test-fns-f…
DeleMike May 26, 2025
876ab20
Merge remote-tracking branch 'origin/main' into feat/write-test-fns-f…
DeleMike May 31, 2025
57fe5d9
add AboutUtil Instrumentation tests
DeleMike Jun 9, 2025
aae6609
Merge branch 'main' into feat/write-test-fns-for-about-util
DeleMike Jun 9, 2025
a72268b
Merge branch 'main' into feat/write-test-fns-for-about-util
DeleMike Jun 10, 2025
f9b3b84
Merge branch 'main' into feat/write-test-fns-for-about-util
DeleMike Jun 11, 2025
9b8e3a8
Merge branch 'main' into feat/write-test-fns-for-about-util
DeleMike Jun 11, 2025
58a904e
Merge branch 'main' into feat/write-test-fns-for-about-util
DeleMike Jun 15, 2025
e3693d3
Merge remote-tracking branch 'origin/main' into feat/write-test-fns-f…
DeleMike Jun 22, 2025
3aa2ad2
fix gradle file
DeleMike Jun 22, 2025
4d6a720
update android CI/CD
DeleMike Jun 22, 2025
08b856a
fix sharehelper class
DeleMike Jun 22, 2025
9832e0e
fix class to follow kotlin standard formatting
DeleMike Jun 22, 2025
7ceb7cb
Fix NoActivityResumedException in onShareScribeClick test by launchin…
DeleMike Jun 22, 2025
9e1d2f7
docs: add KDoc for AboutUtilInstrumentedTest and its test methods
DeleMike Jun 22, 2025
e7dfa9f
chore:formating the build.gradle.kts
angrezichatterbox Jun 24, 2025
1416b72
chore:migrate from junit4 to junit4 for unit tests
angrezichatterbox Jun 24, 2025
1d490e9
Standardize comments in testing file
andrewtavis Jun 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
instrumentation_test:
runs-on: ubuntu-latest
name: Run Android Instrumentation Tests
timeout-minutes: 30
timeout-minutes: 50
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -116,5 +116,7 @@ jobs:
adb shell settings put global window_animation_scale 0.0
adb shell settings put global transition_animation_scale 0.0
adb shell settings put global animator_duration_scale 0.0
sleep 5
adb shell pm list packages >/dev/null
sleep 10
adb shell getprop sys.boot_completed
./gradlew connectedCoreDebugAndroidTest --stacktrace
61 changes: 38 additions & 23 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ plugins {
id("io.gitlab.arturbosch.detekt")
id("com.google.devtools.ksp") version "2.0.0-1.0.22" apply true
id("de.mannodermaus.android-junit5") version "1.11.2.0"
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0"
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21"
id("jacoco")
kotlin("plugin.serialization") version "1.9.0"
id("org.jetbrains.kotlinx.kover") version "0.6.1"
Expand All @@ -27,6 +27,7 @@ jacoco {
toolVersion = "0.8.12"
}

val kotlinVersion by extra("2.0.0")
val junit5Version by extra("5.11.2")
val mockkVersion by extra("1.13.13")

Expand All @@ -44,6 +45,16 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

packaging {
resources {
pickFirsts.add("META-INF/LICENSE*")
pickFirsts.add("META-INF/ASL2.0")
pickFirsts.add("META-INF/NOTICE*")
pickFirsts.add("META-INF/LGPL2.1")

}
}


kover {
verify {
Expand All @@ -65,12 +76,12 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
}

buildFeatures {
Expand Down Expand Up @@ -111,6 +122,9 @@ android {

sourceSets {
getByName("main").java.srcDirs("src/main/kotlin")
named("test") {
java.srcDirs("src/test/java", "src/test/kotlin")
}
}

lint {
Expand Down Expand Up @@ -202,7 +216,7 @@ dependencies {
// ==========================
// Kotlin
// ==========================
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.0")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.1.21")

// ==========================
// Layout and UI
Expand Down Expand Up @@ -245,22 +259,27 @@ dependencies {
// ==========================
// Unit Testing
// ==========================


testImplementation("org.junit.jupiter:junit-jupiter-api:$junit5Version")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit5Version")
testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2")
testImplementation("junit:junit:4.13.2")
testImplementation("org.robolectric:robolectric:4.13")
testImplementation("androidx.compose.ui:ui-test-junit4:1.8.3")
testImplementation("org.jetbrains.kotlin:kotlin-test:2.0.20")
testImplementation ("org.mockito:mockito-core:5.12.0")
testImplementation ("org.mockito:mockito-inline:5.2.0")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.2.1")
testImplementation("com.google.truth:truth:1.4.4")

// ==========================
// Instrumentation Tests
// ==========================
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.8.3")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.8.3")

// ==========================
// UI Tests
// ==========================
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.8.3")
androidTestImplementation("io.mockk:mockk-android:$mockkVersion")
androidTestImplementation("com.google.truth:truth:1.4.4")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.8.3")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")

// ==========================
Expand All @@ -271,21 +290,20 @@ dependencies {
androidTestImplementation("androidx.test.espresso:espresso-intents:3.6.1")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test:runner:1.6.2")
androidTestImplementation("io.mockk:mockk-android:1.13.13")
androidTestImplementation("io.mockk:mockk-android:1.14.2")

// ==========================
// Other
// ==========================

api("joda-time:joda-time:2.12.7")
api("joda-time:joda-time:2.14.0")
api("com.github.tibbi:RecyclerView-FastScroller:e7d3e150c4")
api("com.github.tibbi:reprint:2cb206415d")
api("androidx.core:core-ktx:1.16.0")
api("com.google.code.gson:gson:2.11.0")
api("com.google.code.gson:gson:2.13.1")
api("com.github.bumptech.glide:glide:4.16.0")
ksp("com.github.bumptech.glide:ksp:4.14.2")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
ksp("com.github.bumptech.glide:ksp:4.16.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
}

tasks.register<Copy>("moveFromi18n") {
Expand Down Expand Up @@ -329,9 +347,6 @@ tasks.withType(Test::class) {
}
}

tasks.withType<Test> {
useJUnitPlatform()
}

tasks.register<JacocoReport>("jacocoTestReport") {
group = "Reporting"
Expand Down
Loading
Loading