diff options
author | Chris Warrington <cmw@google.com> | 2023-05-22 17:00:27 +0100 |
---|---|---|
committer | Chris Warrington <cmw@google.com> | 2023-05-23 15:40:39 +0100 |
commit | ef58b03e037a549c456102d38da05209350a726a (patch) | |
tree | 0861a8a2b5497179e5f8cdbfc2f74ecd27768418 | |
parent | 7ea722a82b6c008fa90a33ea62a261748e0dba84 (diff) | |
download | data-binding-ef58b03e037a549c456102d38da05209350a726a.tar.gz |
Fix version of viewbinding for aosp builds
Bug: 283961584
Test: Manual
Change-Id: I14f98247096b3c309027a808ef36f7307a854ac3
-rw-r--r-- | BUILD.bazel | 35 | ||||
-rw-r--r-- | runtime_version.properties.template | 4 |
2 files changed, 28 insertions, 11 deletions
diff --git a/BUILD.bazel b/BUILD.bazel index 5621b2b5..4ab24fa3 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -141,18 +141,31 @@ iml_module( ], ) -merged_properties( +load("//tools/base/bazel:expand_template.bzl", "expand_template") +load( + "//tools/base/common:version.bzl", + "DEV_BUILD_VERSION", + "RELEASE_BUILD_VERSION", +) + +LATEST_STABLE_DATA_BINDING_BUILD_VERSION = "8.0.1" + +expand_template( name = "data_binding_version_info", - srcs = [ - "//tools/base/common/version/com/android:version.properties", - "//tools/data-binding:databinding.properties", - ], - mappings = [ - "buildVersion:extensions", - "buildVersion:compiler", - "buildVersion:compilerCommon", - "buildVersion:baseLibrary", - ], + out = "data_binding_version_info.properties", + substitutions = select({ + "//tools/base/bazel:without_vendor": { + "{BUILD_VERSION}": LATEST_STABLE_DATA_BINDING_BUILD_VERSION, + }, + "//tools/base/bazel:release": { + "{BUILD_VERSION}": RELEASE_BUILD_VERSION, + }, + "//conditions:default": { + "{BUILD_VERSION}": DEV_BUILD_VERSION, + }, + }), + template = "runtime_version.properties.template", + visibility = ["//visibility:public"], ) fileset( diff --git a/runtime_version.properties.template b/runtime_version.properties.template new file mode 100644 index 00000000..47a829f2 --- /dev/null +++ b/runtime_version.properties.template @@ -0,0 +1,4 @@ +extensions={BUILD_VERSION} +compiler={BUILD_VERSION} +compilerCommon={BUILD_VERSION} +baseLibrary={BUILD_VERSION} |