From 23409e1ba1f6c7fa2d4a73dfa4481efecf502c93 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Thu, 9 Mar 2023 18:08:49 -0500 Subject: [PATCH] mobile: remove chromium from main Android AAR (#26019) Before: ```console $ ./bazelw build --config release-android android_dist INFO: Analyzed target //:android_dist (0 packages loaded, 0 targets configured). INFO: Found 1 target... Target //library/kotlin/io/envoyproxy/envoymobile:envoy_aar_with_artifacts up-to-date: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-sources.jar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-javadoc.jar INFO: Elapsed time: 0.282s, Critical Path: 0.07s INFO: 1 process: 1 internal. INFO: Build completed successfully, 1 total action $ rg chromium bazel-bin/library/kotlin/io/envoyproxy/envoymobile | wc -l 5 ``` After: ```console $ ./bazelw build --config release-android android_dist INFO: Analyzed target //:android_dist (0 packages loaded, 0 targets configured). INFO: Found 1 target... Target //library/kotlin/io/envoyproxy/envoymobile:envoy_aar_with_artifacts up-to-date: bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy.aar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-pom.xml bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-sources.jar bazel-bin/library/kotlin/io/envoyproxy/envoymobile/envoy-javadoc.jar INFO: Elapsed time: 0.282s, Critical Path: 0.07s INFO: 1 process: 1 internal. INFO: Build completed successfully, 1 total action $ rg chromium bazel-bin/library/kotlin/io/envoyproxy/envoymobile | wc -l 0 ``` Slack discussion: https://envoyproxy.slack.com/archives/CKQ2LK23G/p1676228502975469 Signed-off-by: JP Simard --- mobile/bazel/android_artifacts.bzl | 2 +- mobile/library/java/io/envoyproxy/envoymobile/engine/BUILD | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mobile/bazel/android_artifacts.bzl b/mobile/bazel/android_artifacts.bzl index 6461b3f4718e..f039190800f4 100644 --- a/mobile/bazel/android_artifacts.bzl +++ b/mobile/bazel/android_artifacts.bzl @@ -238,7 +238,7 @@ def _create_classes_jar(name, manifest, android_library): classes_dir=$$(mktemp -d) echo "Creating classes.jar from $(SRCS)" pushd $$classes_dir - unzip $$original_directory/$(SRCS) "io/envoyproxy/*" "org/chromium/net/*" "META-INF/" > /dev/null + unzip $$original_directory/$(SRCS) "io/envoyproxy/*" "META-INF/" > /dev/null find . -name "R.class" -type f -exec rm {} \\; find . -name "R\\$$*.class" -type f -exec rm {} \\; zip -r classes.jar * > /dev/null diff --git a/mobile/library/java/io/envoyproxy/envoymobile/engine/BUILD b/mobile/library/java/io/envoyproxy/envoymobile/engine/BUILD index cf53421b54e1..1710347d9f92 100644 --- a/mobile/library/java/io/envoyproxy/envoymobile/engine/BUILD +++ b/mobile/library/java/io/envoyproxy/envoymobile/engine/BUILD @@ -19,7 +19,6 @@ android_library( "//library/java/io/envoyproxy/envoymobile/engine:envoy_base_engine_lib", "//library/java/io/envoyproxy/envoymobile/engine/types:envoy_c_types_lib", "//library/java/io/envoyproxy/envoymobile/utilities", - "//library/java/org/chromium/net", "@maven//:androidx_annotation_annotation", "@maven//:androidx_core_core", ],