summaryrefslogtreecommitdiff
path: root/libs/documents/build.gradle.kts
blob: 9a1d1046c369b2d234bcf1173ed46fdb5015ac0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@file:Suppress("UnstableApiUsage")

plugins {
    alias(libs.plugins.android.library)
}

android {
    namespace = "org.the_jk.cleversync.documents"

    testOptions {
        unitTests {
            all { test ->
                // Needed to get robolectric FileDescriptorInterceptor to work
                test.jvmArgs("--add-opens=java.base/java.io=ALL-UNNAMED")
            }
        }
    }
}

dependencies {
    implementation(project(":libs:io"))
    implementation(libs.androidx.core)
    implementation(libs.androidx.fragment.ktx)
    implementation(libs.androidx.uiautomator)
    testImplementation(project(":libs:test-utils"))
    androidTestImplementation(project(":libs:test-utils"))
}

val removeTestDirs = tasks.register<Exec>("removeTestDirs") {
    executable = android.adbExecutable.toString()
    args("shell", "rm", "-vrf", "/sdcard/Download/DocumentTreeTest-*")
}

tasks.all {
    if (name == "connectedDebugAndroidTest") {
        finalizedBy(removeTestDirs)
    }
}