Skip to content

Commit

Permalink
mobile: remove chromium from main Android AAR (envoyproxy#26019)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jpsim authored Mar 9, 2023
1 parent abeff27 commit 23409e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion mobile/bazel/android_artifacts.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion mobile/library/java/io/envoyproxy/envoymobile/engine/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down

0 comments on commit 23409e1

Please sign in to comment.