Skip to content

Commit

Permalink
Add explicit test deps for dependencies otherwise imported implicitly…
Browse files Browse the repository at this point in the history
… via the plugin_api_for_tests rule.

(cherry picked from commit e2d9fed)
  • Loading branch information
Googler authored and mai93 committed Oct 18, 2022
1 parent 11b1d54 commit 5e14fbb
Show file tree
Hide file tree
Showing 14 changed files with 48 additions and 0 deletions.
18 changes: 18 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,24 @@ jvm_maven_import_external(
server_urls = ["https://repo1.maven.org/maven2"],
)

jvm_maven_import_external(
name = "com_google_guava_guava",
artifact = "com.google.guava:guava:31.1-jre",
artifact_sha256 = "a42edc9cab792e39fe39bb94f3fca655ed157ff87a8af78e1d6ba5b07c4a00ab",
server_urls = [
"https://repo1.maven.org/maven2",
],
)

jvm_maven_import_external(
name = "gson",
artifact = "com.google.code.gson:gson:2.9.1",
artifact_sha256 = "378534e339e6e6d50b1736fb3abb76f1c15d1be3f4c13cec6d536412e23da603",
server_urls = [
"https://repo1.maven.org/maven2",
],
)

_JARJAR_BUILD_FILE = """
java_binary(
name = "jarjar_bin",
Expand Down
5 changes: 5 additions & 0 deletions aswb/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ java_library(
"//base",
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"@com_google_guava_guava//jar",
],
)

Expand Down Expand Up @@ -102,6 +103,7 @@ java_library(
"//intellij_platform_sdk:test_libs",
"//java",
"//testing:lib",
"@com_google_guava_guava//jar",
"@error_prone_annotations//jar",
"@junit//jar",
],
Expand Down Expand Up @@ -151,6 +153,7 @@ intellij_unit_test_suite(
"//java",
"//proto:proto_deps",
"//testing:lib",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand Down Expand Up @@ -201,6 +204,8 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:test_libs",
"//java",
"//proto:proto_deps",
"@com_google_guava_guava//jar",
"@gson//jar",
"@junit//jar",
],
)
Expand Down
4 changes: 4 additions & 0 deletions base/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ java_library(
"//testing:lib",
"//third_party/auto_value",
"//third_party/bazel/src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand All @@ -421,6 +422,7 @@ java_library(
"//proto:proto_deps",
"//sdkcompat",
"//testing:lib",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand Down Expand Up @@ -452,6 +454,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:test_libs",
"//proto:proto_deps",
"//testing:lib",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand All @@ -472,6 +475,7 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//proto:proto_deps",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
1 change: 1 addition & 0 deletions common/experiments/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//testing:lib",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
3 changes: 3 additions & 0 deletions cpp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ intellij_unit_test_suite(
runtime_deps = ["//intellij_platform_sdk:test_libs"],
deps = [
":cpp",
"@com_google_guava_guava//jar",
"//base",
"//base:unit_test_utils",
"//common/experiments",
Expand Down Expand Up @@ -140,6 +141,7 @@ java_library(
"//intellij_platform_sdk:test_libs",
"//sdkcompat",
"//testing:lib",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand Down Expand Up @@ -168,6 +170,7 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//sdkcompat",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
1 change: 1 addition & 0 deletions dart/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:jsr305",
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
2 changes: 2 additions & 0 deletions golang/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:test_libs",
"//testing:lib",
"//third_party/go:go_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand Down Expand Up @@ -109,6 +110,7 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//third_party/go:go_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
2 changes: 2 additions & 0 deletions ijwb/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:jsr305",
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand All @@ -167,6 +168,7 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:jsr305",
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
2 changes: 2 additions & 0 deletions java/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:test_libs",
"//intellij_platform_sdk:truth",
"//proto:proto_deps",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand Down Expand Up @@ -200,6 +201,7 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//proto:proto_deps",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
2 changes: 2 additions & 0 deletions javascript/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:jsr305",
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand All @@ -96,6 +97,7 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//third_party/javascript:javascript_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
2 changes: 2 additions & 0 deletions kotlin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//java",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand All @@ -109,6 +110,7 @@ intellij_integration_test_suite(
"//java",
"//proto:proto_deps",
"//third_party/auto_value",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
3 changes: 3 additions & 0 deletions python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//third_party/python:python_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand All @@ -99,6 +100,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:test_libs",
"//proto:proto_deps",
"//third_party/python:python_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand All @@ -116,6 +118,7 @@ java_library(
"//intellij_platform_sdk:plugin_api_for_tests",
"//intellij_platform_sdk:test_libs",
"//third_party/python:python_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
2 changes: 2 additions & 0 deletions scala/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ intellij_unit_test_suite(
"//intellij_platform_sdk:test_libs",
"//java",
"//third_party/scala:scala_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
Expand All @@ -96,6 +97,7 @@ intellij_integration_test_suite(
"//intellij_platform_sdk:test_libs",
"//java",
"//third_party/scala:scala_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)
1 change: 1 addition & 0 deletions testing/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ java_library(
"//common/experiments:unit_test_utils",
"//intellij_platform_sdk:jsr305",
"//intellij_platform_sdk:plugin_api_for_tests",
"@com_google_guava_guava//jar",
"@junit//jar",
],
)

0 comments on commit 5e14fbb

Please sign in to comment.