aboutsummaryrefslogtreecommitdiff
path: root/shadows/framework/build.gradle
blob: 7d0b21b25c1686ffc6e9dfec80ea583318608c4f (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
new RoboJavaModulePlugin(
        deploy: true
).apply(project)

apply plugin: ShadowsPlugin

shadows {
    packageName "org.robolectric"
    sdkCheckMode "ERROR"
}

configurations {
    jni
}

task copyNatives(type: Copy) {
    outputs.dir file("${buildDir}/resources/main")

    project.afterEvaluate {
        configurations.jni.files.each { File file ->
            def nativeJarMatch = file.name =~ /lib.*-natives-(.*)\.jar/
            if (nativeJarMatch) {
                inputs.file file

                def platformName = nativeJarMatch[0][1]
                from(zipTree(file)) { rename { f -> "$platformName/$f" } }
            }

        }
    }

    into project.file("$buildDir/resources/main")
}

jar {
    dependsOn copyNatives
}

dependencies {
    implementation project(":annotations")
    implementation project(":resources")
    implementation project(":pluginapi")
    implementation project(":utils")
    implementation project(":utils:reflector")
    implementation "androidx.test:monitor:1.1.1"

    compileOnly "com.google.code.findbugs:jsr305:3.0.2"
    api "com.almworks.sqlite4java:sqlite4java:0.282"
    compileOnly(AndroidSdk.MAX_SDK.coordinates) { force = true }
    api "com.ibm.icu:icu4j:53.1"
    api "com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:2.1"

    jni "com.github.axet.litedb:libsqlite:0.282-3:natives-mac-x86_64"
    jni "com.github.axet.litedb:libsqlite:0.282-3:natives-linux-x86"
    jni "com.github.axet.litedb:libsqlite:0.282-3:natives-linux-x86_64"
    jni "com.github.axet.litedb:libsqlite:0.282-3:natives-windows-x86"
    jni "com.github.axet.litedb:libsqlite:0.282-3:natives-windows-x86_64"
}