Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,8 @@ dev_maven.install(
"androidx.compose.foundation:foundation-layout:1.5.0-beta01",
# https://github.com/bazel-contrib/rules_jvm_external/issues/909#issuecomment-2019217013
"androidx.annotation:annotation:1.6.0",
# https://github.com/bazel-contrib/rules_jvm_external/issues/1409
"com.squareup.okhttp3:okhttp:4.12.0",
],
generate_compat_repositories = True,
lock_file = "//tests/custom_maven_install:regression_testing_gradle_install.json",
Expand Down
2 changes: 2 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ maven_install(
"androidx.compose.foundation:foundation-layout:1.5.0-beta01",
# https://github.com/bazel-contrib/rules_jvm_external/issues/909#issuecomment-2019217013
"androidx.annotation:annotation:1.6.0",
# https://github.com/bazel-contrib/rules_jvm_external/issues/1409
"com.squareup.okhttp3:okhttp:4.12.0",
],
generate_compat_repositories = True,
maven_install_json = "//tests/custom_maven_install:regression_testing_gradle_install.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ private void collectPOMsForAllComponents(
List<Dependency> pomDependencies = new ArrayList<>();
Map<Coordinates, Coordinates> moduleToRequestedCoordinates = new HashMap<>();

for (GradleResolvedDependency dependency : resolvedRoots) {
// We need to request POMs for all deps including transitive deps when we request
// a coordinate with explicit extension, as transitive poms aren't fetched by default
for (GradleResolvedDependency dependency : coordinatesResolvedDependencyMap.values()) {
Coordinates coordinates =
new Coordinates(
dependency.getGroup() + ":" + dependency.getName() + ":" + dependency.getVersion());
Expand Down
16 changes: 16 additions & 0 deletions tests/bazel_run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,22 @@ function test_gradle_metadata_is_resolved_correctly_for_jvm_artifact {
bazel query @regression_testing_gradle//:androidx_annotation_annotation_jvm >> "$TEST_LOG" 2>&1

expect_log "@regression_testing_gradle//:androidx_annotation_annotation_jvm"

bazel query @regression_testing_gradle//:androidx_annotation_annotation_jvm >> "$TEST_LOG" 2>&1

# This is KMP artifact which is a transitive depndency

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: depndency

# and the JAR for this coordinate will just be a dummy jar/placeholder (in some cases a klib file)
# as gradle will use metadata to resolve the right one.
# Regardless we'll want to pull this in because the actual artifacts will be its children
# in the resolved graph with gradle
bazel query @regression_testing_gradle//:com_squareup_okio_okio >> "$TEST_LOG" 2>&1

expect_log "@regression_testing_gradle//:com_squareup_okio_okio"

# This is the actual JVM artifact which will have the jar for the KMP artifact
bazel query @regression_testing_gradle//:com_squareup_okio_okio_jvm >> "$TEST_LOG" 2>&1

expect_log "@regression_testing_gradle//:com_squareup_okio_okio_jvm"
}


Expand Down
Loading