include_defs('//ReactAndroid/DEFS')

android_library(
    name = 'robolectric',
    exported_deps = [
        ':robolectric-core',
        ':robolectric-resources',
        ':robolectric-annotations',
        ':robolectric-utils',
        ':bouncycastle',
        ':vtd-xml',
        ':icu',
        ':android-all-4.1.2_r1-robolectric-0',
        ':json-20080701',
        ':tagsoup-1.2',
        ':shadows-core-3.0-16',
        react_native_dep('third-party/java/asm:asm'),
        react_native_dep('third-party/java/sqlite:sqlite'),
    ],
    visibility = ['//ReactAndroid/...',],
)

prebuilt_jar(
    name = 'robolectric-core',
    binary_jar = ':robolectric-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'robolectric-binary-jar',
    url = 'mvn:org.robolectric:robolectric:jar:3.0',
    sha1 = 'f888cea3bc1a24110e315eb9827ab593610ea62f',
)

prebuilt_jar(
    name = 'robolectric-resources',
    binary_jar = ':robolectric-resources-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'robolectric-resources-binary-jar',
    url = 'mvn:org.robolectric:robolectric-resources:jar:3.0',
    sha1 = '1ab609054aab67cd13a434567467f4b4774f2465',
)

prebuilt_jar(
    name = 'robolectric-annotations',
    binary_jar = ':robolectric-annotations-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'robolectric-annotations-binary-jar',
    url = 'mvn:org.robolectric:robolectric-annotations:jar:3.0',
    sha1 = '2a6cfc072d7680694c1ff893c5dc8fec33163110',
)

prebuilt_jar(
    name = 'robolectric-utils',
    binary_jar = ':robolectric-utils-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'robolectric-utils-binary-jar',
    url = 'mvn:org.robolectric:robolectric-utils:jar:3.0',
    sha1 = '4bcecd8115fe7296088bb1636e6cbd7ae8927392',
)

prebuilt_jar(
    name = 'bouncycastle',
    binary_jar = ':bouncycastle-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'bouncycastle-binary-jar',
    url = 'mvn:org.bouncycastle:bcprov-jdk16:jar:1.46',
    sha1 = 'ce091790943599535cbb4de8ede84535b0c1260c',
)

prebuilt_jar(
    name = 'vtd-xml',
    binary_jar = ':vtd-xml-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'vtd-xml-binary-jar',
    url = 'mvn:com.ximpleware:vtd-xml:jar:2.11',
    sha1 = 'ee5bcf62c1acf76434ee9f1c67a840bafef72a6d',
)

prebuilt_jar(
    name = 'icu',
    binary_jar = ':icu-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'icu-binary-jar',
    url = 'mvn:com.ibm.icu:icu4j:jar:53.1',
    sha1 = '786d9055d4ca8c1aab4a7d4ac8283f973fd7e41f',
)

prebuilt_jar(
    name = 'android-all-4.1.2_r1-robolectric-0', # name defines filename used by robolectric in runtime
    binary_jar = ':robolectric-android-all-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'robolectric-android-all-binary-jar',
    url = 'mvn:org.robolectric:android-all:jar:4.1.2_r1-robolectric-0',
    sha1 = 'aecc8ce5119a25fcea1cdf8285469c9d1261a352',
)

prebuilt_jar(
    name = 'json-20080701', # name defines filename used by robolectric in runtime
    binary_jar = ':json-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'json-jar',
    url = 'mvn:org.json:json:jar:20080701',
    sha1 = 'd652f102185530c93b66158b1859f35d45687258',
)

prebuilt_jar(
    name = 'tagsoup-1.2', # name defines filename used by robolectric in runtime
    binary_jar = ':tagsoup-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'tagsoup-jar',
    url = 'mvn:org.ccil.cowan.tagsoup:tagsoup:jar:1.2',
    sha1 = '639fd364750d7363c85797dc944b4a80f78fa684',
)

prebuilt_jar(
    name = 'shadows-core-3.0-16', # name defines filename used by robolectric in runtime
    binary_jar = ':robolectric-shadows-binary-jar',
    visibility = ['//ReactAndroid/...',],
)

remote_file(
    name = 'robolectric-shadows-binary-jar',
    url = 'https://repo1.maven.org/maven2/org/robolectric/shadows-core/3.0/shadows-core-3.0-16.jar',
    sha1 = '39d7a856bf91640b1a6d044333336a2b3f3c198f',
)
