Add Automotive OS API 29 stubs to platform SDK optionals.

Android Automotive OS stubs (android.car-stubs.jar) is used
to compile apps against Car API.

NOTE: We tried using
${OUT_DIR}/target/common/obj/JAVA_LIBRARIES/android.car-stubs_intermediates/classes.jar,
but it doesn't work because car-stubs are not generated when building
regular Android SDK for phones.

Bug: 154653660
Test: m -j
Test: m -j dist
Test: 1. $ ./build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=sdk_phone_armv7 \
             TARGET_BUILD_VARIANT=userdebug win_sdk dist DIST_DIR=dist-mine sdk_repo
      2. Copy and unzip dist-mine/android-sdk_eng.zhomart_windows.zip to
         $HOME/Android/Sdk (replaced the existing Sdk forlder)
      3. Created a sample app, used "android.car.Car" and verified it
         compiles, runs and connects to the car service.
Change-Id: I1913fd89cf1cd702b3b5b3f386cf3693a5042eea
This commit is contained in:
Zhomart Mukhamejanov
2020-07-17 10:45:11 -07:00
parent 6f16baeea9
commit ecf644f2d6
2 changed files with 7 additions and 0 deletions

View File

@@ -4,6 +4,11 @@
"jar": "org.apache.http.legacy.jar",
"manifest": false
},
{
"name": "android.car",
"jar": "android.car.jar",
"manifest": false
},
{
"name": "android.test.mock",
"jar": "android.test.mock.jar",

View File

@@ -172,6 +172,8 @@ ${OUT_DIR}/target/common/obj/PACKAGING/android_jar_intermediates/android-stubs-s
# optional API files.
development/build/optional.json platforms/${PLATFORM_NAME}/optional/optional.json
${OUT_DIR}/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy.stubs_intermediates/classes.jar platforms/${PLATFORM_NAME}/optional/org.apache.http.legacy.jar
# Android Automotive OS stubs.
prebuilts/sdk/29/public/android.car.jar platforms/${PLATFORM_NAME}/optional/android.car.jar
# deprecated APIs
${OUT_DIR}/target/common/obj/JAVA_LIBRARIES/android_uiautomator_intermediates/classes.jar platforms/${PLATFORM_NAME}/uiautomator.jar
# Test APIs