Skip to content

Commit

Permalink
Merge pull request #18 from mauriciogg/master
Browse files Browse the repository at this point in the history
Use instrumented jars
  • Loading branch information
brettchabot authored Oct 8, 2021
2 parents 92150aa + 564a89e commit 02d581f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 77 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ http_archive(
load("@rules_jvm_external//:defs.bzl", "maven_install")
maven_install(
artifacts = [
"org.robolectric:robolectric:4.5",
"org.robolectric:robolectric:4.6",
],
repositories = [
"https://maven.google.com",
Expand Down
28 changes: 14 additions & 14 deletions bazel/BUILD
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
ANDROID_ALL_JARS = [
"@org_robolectric_android_all_11_robolectric_6757853//jar",
"@org_robolectric_android_all_10_robolectric_5803371//jar",
"@org_robolectric_android_all_9_robolectric_4913185_2//jar",
"@org_robolectric_android_all_8_1_0_robolectric_4611349//jar",
"@org_robolectric_android_all_8_0_0_r4_robolectric_r1//jar",
"@org_robolectric_android_all_7_1_0_r7_robolectric_r1//jar",
"@org_robolectric_android_all_7_0_0_r1_robolectric_r1//jar",
"@org_robolectric_android_all_6_0_1_r3_robolectric_r1//jar",
"@org_robolectric_android_all_5_1_1_r9_robolectric_r2//jar",
"@org_robolectric_android_all_5_0_2_r3_robolectric_r0//jar",
"@org_robolectric_android_all_4_4_r1_robolectric_r2//jar",
"@org_robolectric_android_all_4_3_r2_robolectric_r1//jar",
"@org_robolectric_android_all_4_2_2_r1_2_robolectric_r1//jar",
"@org_robolectric_android_all_4_1_2_r1_robolectric_r1//jar",
"@org_robolectric_android_all_instrumented_11_robolectric_6757853_i1//jar",
"@org_robolectric_android_all_instrumented_10_robolectric_5803371_i1//jar",
"@org_robolectric_android_all_instrumented_9_robolectric_4913185_2_i1//jar",
"@org_robolectric_android_all_instrumented_8_1_0_robolectric_4611349_i1//jar",
"@org_robolectric_android_all_instrumented_8_0_0_r4_robolectric_r1_i1//jar",
"@org_robolectric_android_all_instrumented_7_1_0_r7_robolectric_r1_i1//jar",
"@org_robolectric_android_all_instrumented_7_0_0_r1_robolectric_r1_i1//jar",
"@org_robolectric_android_all_instrumented_6_0_1_r3_robolectric_r1_i1//jar",
"@org_robolectric_android_all_instrumented_5_1_1_r9_robolectric_r2_i1//jar",
"@org_robolectric_android_all_instrumented_5_0_2_r3_robolectric_r0_i1//jar",
"@org_robolectric_android_all_instrumented_4_4_r1_robolectric_r2_i1//jar",
"@org_robolectric_android_all_instrumented_4_3_r2_robolectric_r1_i1//jar",
"@org_robolectric_android_all_instrumented_4_2_2_r1_2_robolectric_r1_i1//jar",
"@org_robolectric_android_all_instrumented_4_1_2_r1_robolectric_r1_i1//jar",
]

java_library(
Expand Down
12 changes: 6 additions & 6 deletions bazel/gen-deps.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import sys

def getKey(jar):
group_and_artifact = "org.robolectric\:android-all\:"
# Given "external/org_robolectric_android_all_4_1_2_r1_robolectric_r1/jar/android-all-4.1.2_r1-robolectric-r1.jar"
group_and_artifact = "org.robolectric\:android-all-instrumented\:"
# Given "external/org_robolectric_android_all_instrumented_4_1_2_r1_robolectric_r1/jar/android-all-instrumented-4.1.2_r1-robolectric-r1.jar"
# We want "4.1.2_r1-robolectric-r1.jar"
version = jar.split("android-all-")[1][:-4]
version = jar.split("android-all-instrumented-")[1][:-4]
return group_and_artifact + version

def getValue(jar):
# Given "external/org_robolectric_android_all_4_1_2_r1_robolectric_r1/jar/android-all-4.1.2_r1-robolectric-r1.jar"
# We want "../../org_robolectric_android_all_4_1_2_r1_robolectric_r1/jar/android-all-4.1.2_r1-robolectric-r1.jar"
# Given "external/org_robolectric_android_all_instrumented_4_1_2_r1_robolectric_r1/jar/android-all-instrumented-4.1.2_r1-robolectric-r1.jar"
# We want "../../org_robolectric_android_all_instrumented_4_1_2_r1_robolectric_r1/jar/android-all-instrumented-4.1.2_r1-robolectric-r1.jar"
return "../../" + jar[jar.index("org_robolectric"):]

def main(argv):
for jar in argv[1:]:
# e.g.
# org.robolectric\:android-all\:4.1.2_r1-robolectric-r1.jar=../../org_robolectric_android_all_4_1_2_r1_robolectric_r1/jar/android-all-4.1.2_r1-robolectric-r1.jar
# org.robolectric\:android-all-instrumented\:4.1.2_r1-robolectric-r1.jar=../../org_robolectric_android_all_instrumented_4_1_2_r1_robolectric_r1/jar/android-all-instrumented-4.1.2_r1-robolectric-r1.jar
print("%s=%s" % (getKey(jar), getValue(jar)))

if __name__ == "__main__":
Expand Down
112 changes: 56 additions & 56 deletions bazel/robolectric.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,115 +2,115 @@ load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")

def robolectric_repositories():
jvm_maven_import_external(
name = "org_robolectric_android_all_11_robolectric_6757853",
artifact = "org.robolectric:android-all:11-robolectric-6757853",
name = "org_robolectric_android_all_instrumented_11_robolectric_6757853_i1",
artifact = "org.robolectric:android-all-instrumented:11-robolectric-6757853-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "62f577ca49f62f0da5d6a2a839d80ef377054b9ccd14811035593bf351295b31",
licenses = ["notice"]
artifact_sha256 = "eee277058d0547ed6b8b83efcf613fd64a621a61e3d8f74980c825f0c822638c",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_10_robolectric_5803371",
artifact = "org.robolectric:android-all:10-robolectric-5803371",
name = "org_robolectric_android_all_instrumented_10_robolectric_5803371_i1",
artifact = "org.robolectric:android-all-instrumented:10-robolectric-5803371-i1",
artifact_sha256 = "1cb39d10a234bf9de90e187ce62d98966f3d00187cadcaab6c200fe901120f3e",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "a0ad701eedd47bdaefbac1c2cc80dd400c0adea3cccd8a3ad286f79da1ca294c",
licenses = ["notice"]
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_9_robolectric_4913185_2",
artifact = "org.robolectric:android-all:9-robolectric-4913185-2",
name = "org_robolectric_android_all_instrumented_9_robolectric_4913185_2_i1",
artifact = "org.robolectric:android-all-instrumented:9-robolectric-4913185-2-i1",
artifact_sha256 = "61d77411d7a0ae8d321dba735a6fc7c9e4bbabacb314a7aef5d1806e5f20c6b5",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "cf4aed5e458deb48ddc0ca92fc25156e6f478d9d5c1d948cdd1817a67ee11b32",
licenses = ["notice"]
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_8_1_0_robolectric_4611349",
artifact = "org.robolectric:android-all:8.1.0-robolectric-4611349",
name = "org_robolectric_android_all_instrumented_8_1_0_robolectric_4611349_i1",
artifact = "org.robolectric:android-all-instrumented:8.1.0-robolectric-4611349-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "01b3364bc0b4ca099929aa4d818529c7ec05e18b9e4c1e667f99955b16ae19b4",
licenses = ["notice"]
artifact_sha256 = "131de2037bfac731ad5e0fc4d36869d88414f07c6d43af0d6a38baea0f3ac02d",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_8_0_0_r4_robolectric_r1",
artifact = "org.robolectric:android-all:8.0.0_r4-robolectric-r1",
name = "org_robolectric_android_all_instrumented_8_0_0_r4_robolectric_r1_i1",
artifact = "org.robolectric:android-all-instrumented:8.0.0_r4-robolectric-r1-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "3707dc100381e3bbcc57b85255fd313ae20875fc65cf3130c47e86f044ad77f0",
licenses = ["notice"]
artifact_sha256 = "480a61c883669d2ed486ce4d9f22907c86e8616bc8cfd37b5e0141f34696ab62",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_7_1_0_r7_robolectric_r1",
artifact = "org.robolectric:android-all:7.1.0_r7-robolectric-r1",
name = "org_robolectric_android_all_instrumented_7_1_0_r7_robolectric_r1_i1",
artifact = "org.robolectric:android-all-instrumented:7.1.0_r7-robolectric-r1-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "6eb4a8049ff343cace89469441215ee14a1ee90295059729ece51821c078248d",
licenses = ["notice"]
artifact_sha256 = "ac691c9cf3feb5daeb26a32a2596138ea8af3985ce251ee39b4e7597499fd7a3",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_7_0_0_r1_robolectric_r1",
artifact = "org.robolectric:android-all:7.0.0_r1-robolectric-r1",
name = "org_robolectric_android_all_instrumented_7_0_0_r1_robolectric_r1_i1",
artifact = "org.robolectric:android-all-instrumented:7.0.0_r1-robolectric-r1-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "567bfa3cd3a8c9c5ca736bd86b3f90ff4d6a7ba333b9cfea6ff7d81924f90ce9",
licenses = ["notice"]
artifact_sha256 = "729716e43f207b77f156ce7bb93a3393f5029c7348eb6f069d6bfc55715e1a4d",
licenses = ["notice"],
)


jvm_maven_import_external(
name = "org_robolectric_android_all_6_0_1_r3_robolectric_r1",
artifact = "org.robolectric:android-all:6.0.1_r3-robolectric-r1",
name = "org_robolectric_android_all_instrumented_6_0_1_r3_robolectric_r1_i1",
artifact = "org.robolectric:android-all-instrumented:6.0.1_r3-robolectric-r1-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "a2d84271c5f033b1d082741a02f37a2d043120c0c09e5854e97ece9c3bb11d31",
licenses = ["notice"]
artifact_sha256 = "1fa614df8c1432142527fb58d91b5caa08f473f6b1e6671d4629da5967ed9930",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_5_1_1_r9_robolectric_r2",
artifact = "org.robolectric:android-all:5.1.1_r9-robolectric-r2",
name = "org_robolectric_android_all_instrumented_5_1_1_r9_robolectric_r2_i1",
artifact = "org.robolectric:android-all-instrumented:5.1.1_r9-robolectric-r2-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "edced221f686f89ad592b3354bb7fbfeca8537268298cc0d8a2b0b62e740316a",
licenses = ["notice"]
artifact_sha256 = "2e537f9febe37a36f12ba67da3b752adbab67cadf0c81597e936df714c1a38b0",
licenses = ["notice"],
)


jvm_maven_import_external(
name = "org_robolectric_android_all_5_0_2_r3_robolectric_r0",
artifact = "org.robolectric:android-all:5.0.2_r3-robolectric-r0",
name = "org_robolectric_android_all_instrumented_5_0_2_r3_robolectric_r0_i1",
artifact = "org.robolectric:android-all-instrumented:5.0.2_r3-robolectric-r0-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "5e63d4c7f2c691afed648bf0675e0b0a76d19f0e23d93705f4faf9ed3b2734de",
licenses = ["notice"]
artifact_sha256 = "92a75e2487218a7e2428b7a3f2e81c3db8c5ca6b637f3d9e19c95ef4efc92dc7",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_4_4_r1_robolectric_r2",
artifact = "org.robolectric:android-all:4.4_r1-robolectric-r2",
name = "org_robolectric_android_all_instrumented_4_4_r1_robolectric_r2_i1",
artifact = "org.robolectric:android-all-instrumented:4.4_r1-robolectric-r2-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "5c68ab0a11d6f46e303505e75da62215f45b6a46ff7877441a31d527899359f9",
licenses = ["notice"]
artifact_sha256 = "45fd77639161f51b2c72335ccccade45054ed72217d8f2451dceef3dc0135abb",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_4_3_r2_robolectric_r1",
artifact = "org.robolectric:android-all:4.3_r2-robolectric-r1",
name = "org_robolectric_android_all_instrumented_4_3_r2_robolectric_r1_i1",
artifact = "org.robolectric:android-all-instrumented:4.3_r2-robolectric-r1-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "c3ffdc8a561682b1ae89c94b1d074575f4ccae92c34a7d8c25b819e0828e3495",
licenses = ["notice"]
artifact_sha256 = "7c72dd141bde753eefd1d7fb49effc60330c104e6a62a69882242440583fa636",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_4_2_2_r1_2_robolectric_r1",
artifact = "org.robolectric:android-all:4.2.2_r1.2-robolectric-r1",
name = "org_robolectric_android_all_instrumented_4_2_2_r1_2_robolectric_r1_i1",
artifact = "org.robolectric:android-all-instrumented:4.2.2_r1.2-robolectric-r1-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "a6c478c3dd8d6f06c0fb9652ed48539e225934f5433a3268dc0053b24ccfe7a2",
licenses = ["notice"]
artifact_sha256 = "d731a5aa3a83f15d505437f4e5df86bc78ab4fc84f188d54815c58d769c28329",
licenses = ["notice"],
)

jvm_maven_import_external(
name = "org_robolectric_android_all_4_1_2_r1_robolectric_r1",
artifact = "org.robolectric:android-all:4.1.2_r1-robolectric-r1",
name = "org_robolectric_android_all_instrumented_4_1_2_r1_robolectric_r1_i1",
artifact = "org.robolectric:android-all-instrumented:4.1.2_r1-robolectric-r1-i1",
server_urls = ["https://repo1.maven.org/maven2"],
artifact_sha256 = "99c9629f0dc47e20e3a44eec61cabd09a74a98f315c534edfe82c1952057c313",
licenses = ["notice"]
artifact_sha256 = "364ea38d9e4cc5ec1a28fb695dfeb3da520450dc933eafdf9f24db97ccef0a40",
licenses = ["notice"],
)

0 comments on commit 02d581f

Please sign in to comment.