Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android: update bazel flag config #684

Merged
merged 5 commits into from
Feb 13, 2020
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
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ build --javabase=@bazel_tools//tools/jdk:jdk
build:ios --define=manual_stamp=manual_stamp

# Default flags for builds targeting Android
build:android --fat_apk_cpu=x86_64
build:android --define logger=android

# Common flags for release builds
# TODO: Enable `--copt -ggdb3`. Issues were encountered previously with this:
Expand All @@ -42,4 +42,6 @@ build:release-ios --config=release-common
build:release-ios --copt=-fembed-bitcode

# Flags for release builds targeting Android or the JVM
build:release-android --config=android
build:release-android --config=release-common
build:release-android --fat_apk_cpu=x86,armeabi-v7a,arm64-v8a
junr03 marked this conversation as resolved.
Show resolved Hide resolved
1 change: 0 additions & 1 deletion .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
current_short_commit=$(git rev-parse --short HEAD)
bazel build \
--config=release-android \
--fat_apk_cpu=x86,armeabi-v7a,arm64-v8a \
--define=pom_version=master-$current_short_commit \
//:android_deploy
- uses: actions/upload-artifact@v1
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
current_release_tag=$(git describe --tags --abbrev=0 --exact-match)
bazel build \
--config=release-android \
--fat_apk_cpu=x86,armeabi-v7a,arm64-v8a \
--define=pom_version="${current_release_tag:1}" \
//:android_deploy
- name: 'Configure gpg signing'
Expand Down
2 changes: 1 addition & 1 deletion docs/root/development/performance/cpu_battery_impact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ a process listening to traffic sent over this connection.

Getting the build:

1. Build the library using ``bazel build android_dist --config=android``
junr03 marked this conversation as resolved.
Show resolved Hide resolved
1. Build the library using ``bazel build android_dist --fat_apk_cpu=armeabi-v7a``
2. Control: ``bazel mobile-install //examples/kotlin/control:hello_control_kt``
3. Envoy: ``bazel mobile-install //examples/kotlin/hello_world:hello_envoy_kt --fat_apk_cpu=armeabi-v7a``

Expand Down
4 changes: 2 additions & 2 deletions docs/root/start/building/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Android AAR
Envoy Mobile can be compiled into an ``.aar`` file for use with Android apps.
This command is defined in the main :repo:`BUILD <BUILD>` file of the repo, and may be run locally:

``bazel build android_dist --config=android``
``bazel build android_dist --config=android --fat_apk_cpu=<arch1,arch2>``

Upon completion of the build, you'll see an ``envoy.aar`` file at :repo:`dist/envoy.aar <dist>`.

Expand All @@ -63,7 +63,7 @@ an example of how this artifact may be used.
**When building the artifact for release** (usage outside of development), be sure to include the
``--config=release-android`` option, along with the architectures for which the artifact is being built:

``bazel build android_dist --config=release-android --fat_apk_cpu=x86,x86_64,armeabi-v7a,arm64-v8a``
``bazel build android_dist --config=release-android``

For a demo of a working app using this artifact, see the :ref:`hello_world` example.

Expand Down
4 changes: 2 additions & 2 deletions docs/root/start/examples/hello_world.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Next, make sure you have an Android simulator running.

Run the :repo:`sample app <examples/java/hello_world>` using the following Bazel build rule:

``bazel mobile-install //examples/java/hello_world:hello_envoy --fat_apk_cpu=x86``
``bazel mobile-install //examples/java/hello_world:hello_envoy --fat_apk_cpu=<arch1,arch2>``

You should see a new app installed on your simulator called ``Hello Envoy``.
Open it up, and requests will start flowing!
Expand All @@ -38,7 +38,7 @@ Next, make sure you have an Android simulator running.

Run the :repo:`sample app <examples/kotlin/hello_world>` using the following Bazel build rule:

``bazel mobile-install //examples/kotlin/hello_world:hello_envoy_kt --fat_apk_cpu=x86``
``bazel mobile-install //examples/kotlin/hello_world:hello_envoy_kt --fat_apk_cpu=<arch1,arch2>``

You should see a new app installed on your simulator called ``Hello Envoy Kotlin``.
Open it up, and requests will start flowing!
Expand Down