diff --git a/automotive/vehicle/aidl/aidl_test/Android.bp b/automotive/vehicle/aidl/aidl_test/Android.bp index 2dc9ee183d..ea6a710031 100644 --- a/automotive/vehicle/aidl/aidl_test/Android.bp +++ b/automotive/vehicle/aidl/aidl_test/Android.bp @@ -49,7 +49,7 @@ android_test { name: "VehiclePropertyAnnotationJavaTest", srcs: [ "VehiclePropertyAnnotationJavaTest.java", - ":IVehicleGeneratedJavaFiles", + ":IVehicleGeneratedJavaFiles-V3", ], static_libs: [ "android.hardware.automotive.vehicle-V3-java", diff --git a/automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/3/cpp/AccessForVehicleProperty.h similarity index 100% rename from automotive/vehicle/aidl/generated_lib/cpp/AccessForVehicleProperty.h rename to automotive/vehicle/aidl/generated_lib/3/cpp/AccessForVehicleProperty.h diff --git a/automotive/vehicle/aidl/generated_lib/cpp/Android.bp b/automotive/vehicle/aidl/generated_lib/3/cpp/Android.bp similarity index 81% rename from automotive/vehicle/aidl/generated_lib/cpp/Android.bp rename to automotive/vehicle/aidl/generated_lib/3/cpp/Android.bp index 11d3693b50..58ffa45288 100644 --- a/automotive/vehicle/aidl/generated_lib/cpp/Android.bp +++ b/automotive/vehicle/aidl/generated_lib/3/cpp/Android.bp @@ -25,3 +25,11 @@ cc_library_headers { export_include_dirs: ["."], defaults: ["VehicleHalInterfaceDefaults"], } + +cc_library_headers { + name: "IVehicleGeneratedHeaders-V3", + vendor_available: true, + local_include_dirs: ["."], + export_include_dirs: ["."], + defaults: ["VehicleHalInterfaceDefaults"], +} diff --git a/automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/3/cpp/ChangeModeForVehicleProperty.h similarity index 100% rename from automotive/vehicle/aidl/generated_lib/cpp/ChangeModeForVehicleProperty.h rename to automotive/vehicle/aidl/generated_lib/3/cpp/ChangeModeForVehicleProperty.h diff --git a/automotive/vehicle/aidl/generated_lib/cpp/VersionForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/3/cpp/VersionForVehicleProperty.h similarity index 100% rename from automotive/vehicle/aidl/generated_lib/cpp/VersionForVehicleProperty.h rename to automotive/vehicle/aidl/generated_lib/3/cpp/VersionForVehicleProperty.h diff --git a/automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/3/java/AccessForVehicleProperty.java similarity index 100% rename from automotive/vehicle/aidl/generated_lib/java/AccessForVehicleProperty.java rename to automotive/vehicle/aidl/generated_lib/3/java/AccessForVehicleProperty.java diff --git a/automotive/vehicle/aidl/generated_lib/java/Android.bp b/automotive/vehicle/aidl/generated_lib/3/java/Android.bp similarity index 89% rename from automotive/vehicle/aidl/generated_lib/java/Android.bp rename to automotive/vehicle/aidl/generated_lib/3/java/Android.bp index 1d612e8292..4e35f19c19 100644 --- a/automotive/vehicle/aidl/generated_lib/java/Android.bp +++ b/automotive/vehicle/aidl/generated_lib/3/java/Android.bp @@ -24,3 +24,10 @@ filegroup { "*.java", ], } + +filegroup { + name: "IVehicleGeneratedJavaFiles-V3", + srcs: [ + "*.java", + ], +} diff --git a/automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/3/java/ChangeModeForVehicleProperty.java similarity index 100% rename from automotive/vehicle/aidl/generated_lib/java/ChangeModeForVehicleProperty.java rename to automotive/vehicle/aidl/generated_lib/3/java/ChangeModeForVehicleProperty.java diff --git a/automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/3/java/EnumForVehicleProperty.java similarity index 100% rename from automotive/vehicle/aidl/generated_lib/java/EnumForVehicleProperty.java rename to automotive/vehicle/aidl/generated_lib/3/java/EnumForVehicleProperty.java diff --git a/automotive/vehicle/aidl/generated_lib/java/UnitsForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/3/java/UnitsForVehicleProperty.java similarity index 100% rename from automotive/vehicle/aidl/generated_lib/java/UnitsForVehicleProperty.java rename to automotive/vehicle/aidl/generated_lib/3/java/UnitsForVehicleProperty.java diff --git a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/Android.bp b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/Android.bp index 75a3541cdd..0a33e5b85d 100644 --- a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/Android.bp +++ b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/Android.bp @@ -27,7 +27,7 @@ cc_library { defaults: ["VehicleHalDefaults"], static_libs: ["VehicleHalUtils"], header_libs: [ - "IVehicleGeneratedHeaders", + "IVehicleGeneratedHeaders-V3", ], shared_libs: ["libjsoncpp"], } @@ -44,7 +44,7 @@ cc_library { defaults: ["VehicleHalDefaults"], static_libs: ["VehicleHalUtils"], header_libs: [ - "IVehicleGeneratedHeaders", + "IVehicleGeneratedHeaders-V3", "libbinder_headers", ], cflags: ["-DENABLE_VEHICLE_HAL_TEST_PROPERTIES"], @@ -59,7 +59,7 @@ cc_library_headers { defaults: ["VehicleHalDefaults"], static_libs: ["VehicleHalUtils"], header_libs: [ - "IVehicleGeneratedHeaders", + "IVehicleGeneratedHeaders-V3", ], shared_libs: ["libjsoncpp"], } diff --git a/automotive/vehicle/aidl/impl/default_config/test/Android.bp b/automotive/vehicle/aidl/impl/default_config/test/Android.bp index 651ed903af..70933bee50 100644 --- a/automotive/vehicle/aidl/impl/default_config/test/Android.bp +++ b/automotive/vehicle/aidl/impl/default_config/test/Android.bp @@ -31,7 +31,7 @@ cc_test { "libgtest", ], header_libs: [ - "IVehicleGeneratedHeaders", + "IVehicleGeneratedHeaders-V3", ], shared_libs: [ "libjsoncpp", @@ -57,7 +57,7 @@ cc_test { "-DENABLE_VEHICLE_HAL_TEST_PROPERTIES", ], header_libs: [ - "IVehicleGeneratedHeaders", + "IVehicleGeneratedHeaders-V3", ], shared_libs: [ "libjsoncpp", diff --git a/automotive/vehicle/aidl/impl/vhal/Android.bp b/automotive/vehicle/aidl/impl/vhal/Android.bp index ae1102f6d2..5cc071d1ae 100644 --- a/automotive/vehicle/aidl/impl/vhal/Android.bp +++ b/automotive/vehicle/aidl/impl/vhal/Android.bp @@ -66,7 +66,7 @@ cc_library { ], header_libs: [ "IVehicleHardware", - "IVehicleGeneratedHeaders", + "IVehicleGeneratedHeaders-V3", ], shared_libs: [ "libbinder_ndk", diff --git a/automotive/vehicle/tools/generate_annotation_enums.py b/automotive/vehicle/tools/generate_annotation_enums.py index f2797678ab..512e945510 100755 --- a/automotive/vehicle/tools/generate_annotation_enums.py +++ b/automotive/vehicle/tools/generate_annotation_enums.py @@ -17,9 +17,9 @@ """A script to generate Java files and CPP header files based on annotations in VehicleProperty.aidl Need ANDROID_BUILD_TOP environmental variable to be set. This script will update - ChangeModeForVehicleProperty.h and AccessForVehicleProperty.h under generated_lib/cpp and + ChangeModeForVehicleProperty.h and AccessForVehicleProperty.h under generated_lib/version/cpp and ChangeModeForVehicleProperty.java, AccessForVehicleProperty.java, EnumForVehicleProperty.java - UnitsForVehicleProperty.java under generated_lib/java. + UnitsForVehicleProperty.java under generated_lib/version/java. Usage: $ python generate_annotation_enums.py @@ -31,22 +31,20 @@ import re import sys import tempfile +# Keep this updated with the latest in-development property version. +PROPERTY_VERSION = '3' + PROP_AIDL_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl_property/android/hardware/' + 'automotive/vehicle/VehicleProperty.aidl') -CHANGE_MODE_CPP_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/cpp/' + - 'ChangeModeForVehicleProperty.h') -ACCESS_CPP_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/cpp/' + - 'AccessForVehicleProperty.h') -CHANGE_MODE_JAVA_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/' + - 'ChangeModeForVehicleProperty.java') -ACCESS_JAVA_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/' + - 'AccessForVehicleProperty.java') -ENUM_JAVA_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/' + - 'EnumForVehicleProperty.java') -UNITS_JAVA_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/java/' + - 'UnitsForVehicleProperty.java') -VERSION_CPP_FILE_PATH = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/cpp/' + - 'VersionForVehicleProperty.h') +GENERATED_LIB = ('hardware/interfaces/automotive/vehicle/aidl/generated_lib/' + PROPERTY_VERSION + + '/') +CHANGE_MODE_CPP_FILE_PATH = GENERATED_LIB + '/cpp/ChangeModeForVehicleProperty.h' +ACCESS_CPP_FILE_PATH = GENERATED_LIB + '/cpp/AccessForVehicleProperty.h' +CHANGE_MODE_JAVA_FILE_PATH = GENERATED_LIB + '/java/ChangeModeForVehicleProperty.java' +ACCESS_JAVA_FILE_PATH = GENERATED_LIB + '/java/AccessForVehicleProperty.java' +ENUM_JAVA_FILE_PATH = GENERATED_LIB + '/java/EnumForVehicleProperty.java' +UNITS_JAVA_FILE_PATH = GENERATED_LIB + '/java/UnitsForVehicleProperty.java' +VERSION_CPP_FILE_PATH = GENERATED_LIB + '/cpp/VersionForVehicleProperty.h' SCRIPT_PATH = 'hardware/interfaces/automotive/vehicle/tools/generate_annotation_enums.py' TAB = ' ' diff --git a/automotive/vehicle/vts/Android.bp b/automotive/vehicle/vts/Android.bp index 67d0d344d4..40aec59402 100644 --- a/automotive/vehicle/vts/Android.bp +++ b/automotive/vehicle/vts/Android.bp @@ -43,7 +43,7 @@ cc_test { "vhalclient_defaults", ], header_libs: [ - "IVehicleGeneratedHeaders", + "IVehicleGeneratedHeaders-V3", ], test_suites: [ "general-tests",