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

Expose android.car jar from android sdk #20712

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all 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
14 changes: 14 additions & 0 deletions tools/android/android_sdk_repository_template.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ def create_android_sdk_rules(
jars = ["platforms/android-%d/optional/org.apache.http.legacy.jar" % api_level],
)

if api_level >= 29:
# Android 29 is min api that compatible with Car App Library
java_import(
name = "android_car-%d" % api_level,
jars = ["platforms/android-%d/optional/android.car.jar" % api_level],
neverlink = 1,
)

if api_level >= 28:
# Android 28 removed most of android.test from android.jar and moved it
# to separate jars.
Expand Down Expand Up @@ -210,6 +218,12 @@ def create_android_sdk_rules(
actual = ":org_apache_http_legacy-%d" % default_api_level,
)

if default_api_level >= 29:
native.alias(
name = "android_car",
actual = ":android_car-%d" % default_api_level,
)

native.alias(
name = "sdk",
actual = ":sdk-%d" % default_api_level,
Expand Down