diff --git a/core/Makefile b/core/Makefile index 7cd055ef3d..ca9542408f 100644 --- a/core/Makefile +++ b/core/Makefile @@ -241,8 +241,8 @@ define generate-common-build-props-with-product-vars-set BUILD_VERSION_TAGS="$(BUILD_VERSION_TAGS)" \ DATE="$(DATE_FROM_FILE)" \ PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \ + PLATFORM_VERSION_LAST_STABLE="$(PLATFORM_VERSION_LAST_STABLE)" \ PLATFORM_VERSION="$(PLATFORM_VERSION)" \ - PLATFORM_VERSION_LAST_STABLE="$(PLATFORM_VERSION)" \ TARGET_BUILD_TYPE="$(TARGET_BUILD_VARIANT)" \ bash $(BUILDINFO_COMMON_SH) "$(1)" >> $(2) endef @@ -447,7 +447,7 @@ endif BUILD_NUMBER="$(BUILD_NUMBER_FROM_FILE)" \ BOARD_BUILD_SYSTEM_ROOT_IMAGE="$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)" \ PLATFORM_VERSION="$(PLATFORM_VERSION)" \ - PLATFORM_VERSION_LAST_STABLE="$(PLATFORM_VERSION)" \ + PLATFORM_VERSION_LAST_STABLE="$(PLATFORM_VERSION_LAST_STABLE)" \ PLATFORM_SECURITY_PATCH="$(PLATFORM_SECURITY_PATCH)" \ PLATFORM_BASE_OS="$(PLATFORM_BASE_OS)" \ PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \ @@ -1121,7 +1121,7 @@ endif endif INTERNAL_MKBOOTIMG_VERSION_ARGS := \ - --os_version $(PLATFORM_VERSION) \ + --os_version $(PLATFORM_VERSION_LAST_STABLE) \ --os_patch_level $(PLATFORM_SECURITY_PATCH) # Define these only if we are building boot @@ -3217,22 +3217,22 @@ endif BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += \ --prop com.android.build.system.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ - --prop com.android.build.system.os_version:$(PLATFORM_VERSION) \ + --prop com.android.build.system.os_version:$(PLATFORM_VERSION_LAST_STABLE) \ --prop com.android.build.system.security_patch:$(PLATFORM_SECURITY_PATCH) BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS += \ --prop com.android.build.product.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ - --prop com.android.build.product.os_version:$(PLATFORM_VERSION) \ + --prop com.android.build.product.os_version:$(PLATFORM_VERSION_LAST_STABLE) \ --prop com.android.build.product.security_patch:$(PLATFORM_SECURITY_PATCH) BOARD_AVB_SYSTEM_EXT_ADD_HASHTREE_FOOTER_ARGS += \ --prop com.android.build.system_ext.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ - --prop com.android.build.system_ext.os_version:$(PLATFORM_VERSION) \ + --prop com.android.build.system_ext.os_version:$(PLATFORM_VERSION_LAST_STABLE) \ --prop com.android.build.system_ext.security_patch:$(PLATFORM_SECURITY_PATCH) BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS += \ --prop com.android.build.boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ - --prop com.android.build.boot.os_version:$(PLATFORM_VERSION) + --prop com.android.build.boot.os_version:$(PLATFORM_VERSION_LAST_STABLE) BOARD_AVB_VENDOR_BOOT_ADD_HASH_FOOTER_ARGS += \ --prop com.android.build.vendor_boot.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ @@ -3242,11 +3242,11 @@ BOARD_AVB_RECOVERY_ADD_HASH_FOOTER_ARGS += \ BOARD_AVB_VENDOR_ADD_HASHTREE_FOOTER_ARGS += \ --prop com.android.build.vendor.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ - --prop com.android.build.vendor.os_version:$(PLATFORM_VERSION) + --prop com.android.build.vendor.os_version:$(PLATFORM_VERSION_LAST_STABLE) BOARD_AVB_ODM_ADD_HASHTREE_FOOTER_ARGS += \ --prop com.android.build.odm.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) \ - --prop com.android.build.odm.os_version:$(PLATFORM_VERSION) + --prop com.android.build.odm.os_version:$(PLATFORM_VERSION_LAST_STABLE) BOARD_AVB_DTBO_ADD_HASH_FOOTER_ARGS += \ --prop com.android.build.dtbo.fingerprint:$(BUILD_FINGERPRINT_FROM_FILE) diff --git a/core/version_defaults.mk b/core/version_defaults.mk index c32cab8f3a..a989895535 100644 --- a/core/version_defaults.mk +++ b/core/version_defaults.mk @@ -84,38 +84,17 @@ MAX_PLATFORM_VERSION := # generate the range of allowed SDK versions, so it must have an entry for every # unreleased API level targetable by this branch, not just those that are valid # lunch targets for this branch. -PLATFORM_VERSION.RP1A := R + +# The last stable version name of the platform that was released. During +# development, this stays at that previous version, while the codename indicates +# further work based on the previous version. +PLATFORM_VERSION_LAST_STABLE := 10 +.KATI_READONLY := PLATFORM_VERSION_LAST_STABLE # These are the current development codenames, if the build is not a final # release build. If this is a final release build, it is simply "REL". PLATFORM_VERSION_CODENAME.RP1A := R -ifndef PLATFORM_VERSION - PLATFORM_VERSION := $(PLATFORM_VERSION.$(TARGET_PLATFORM_VERSION)) - ifndef PLATFORM_VERSION - # PLATFORM_VERSION falls back to TARGET_PLATFORM_VERSION - PLATFORM_VERSION := $(TARGET_PLATFORM_VERSION) - endif -endif -.KATI_READONLY := PLATFORM_VERSION - -ifndef PLATFORM_SDK_VERSION - # This is the canonical definition of the SDK version, which defines - # the set of APIs and functionality available in the platform. It - # is a single integer that increases monotonically as updates to - # the SDK are released. It should only be incremented when the APIs for - # the new release are frozen (so that developers don't write apps against - # intermediate builds). During development, this number remains at the - # SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds - # the code-name of the new development work. - - # When you increment the PLATFORM_SDK_VERSION please ensure you also - # clear out the following text file of all older PLATFORM_VERSION's: - # cts/tests/tests/os/assets/platform_versions.txt - PLATFORM_SDK_VERSION := 29 -endif -.KATI_READONLY := PLATFORM_SDK_VERSION - ifndef PLATFORM_VERSION_CODENAME PLATFORM_VERSION_CODENAME := $(PLATFORM_VERSION_CODENAME.$(TARGET_PLATFORM_VERSION)) ifndef PLATFORM_VERSION_CODENAME @@ -165,6 +144,32 @@ endif PLATFORM_VERSION_ALL_CODENAMES \ PLATFORM_VERSION_FUTURE_CODENAMES +ifndef PLATFORM_VERSION + ifeq (REL,$(PLATFORM_VERSION_CODENAME)) + PLATFORM_VERSION := $(PLATFORM_VERSION_LAST_STABLE) + else + PLATFORM_VERSION := $(PLATFORM_VERSION_CODENAME) + endif +endif +.KATI_READONLY := PLATFORM_VERSION + +ifndef PLATFORM_SDK_VERSION + # This is the canonical definition of the SDK version, which defines + # the set of APIs and functionality available in the platform. It + # is a single integer that increases monotonically as updates to + # the SDK are released. It should only be incremented when the APIs for + # the new release are frozen (so that developers don't write apps against + # intermediate builds). During development, this number remains at the + # SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds + # the code-name of the new development work. + + # When you increment the PLATFORM_SDK_VERSION please ensure you also + # clear out the following text file of all older PLATFORM_VERSION's: + # cts/tests/tests/os/assets/platform_versions.txt + PLATFORM_SDK_VERSION := 29 +endif +.KATI_READONLY := PLATFORM_SDK_VERSION + ifeq (REL,$(PLATFORM_VERSION_CODENAME)) PLATFORM_PREVIEW_SDK_VERSION := 0 else diff --git a/tools/buildinfo.sh b/tools/buildinfo.sh index 436cf5c78e..9bee115484 100755 --- a/tools/buildinfo.sh +++ b/tools/buildinfo.sh @@ -11,8 +11,8 @@ echo "ro.build.version.preview_sdk=$PLATFORM_PREVIEW_SDK_VERSION" echo "ro.build.version.preview_sdk_fingerprint=$PLATFORM_PREVIEW_SDK_FINGERPRINT" echo "ro.build.version.codename=$PLATFORM_VERSION_CODENAME" echo "ro.build.version.all_codenames=$PLATFORM_VERSION_ALL_CODENAMES" -echo "ro.build.version.release=$PLATFORM_VERSION" -echo "ro.build.version.release_or_codename=$PLATFORM_VERSION_LAST_STABLE" +echo "ro.build.version.release=$PLATFORM_VERSION_LAST_STABLE" +echo "ro.build.version.release_or_codename=$PLATFORM_VERSION" echo "ro.build.version.security_patch=$PLATFORM_SECURITY_PATCH" echo "ro.build.version.base_os=$PLATFORM_BASE_OS" echo "ro.build.version.min_supported_target_sdk=$PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION" diff --git a/tools/buildinfo_common.sh b/tools/buildinfo_common.sh index a37d3bc790..673e06f3da 100755 --- a/tools/buildinfo_common.sh +++ b/tools/buildinfo_common.sh @@ -17,8 +17,8 @@ echo "ro.${partition}.build.id=$BUILD_ID" echo "ro.${partition}.build.tags=$BUILD_VERSION_TAGS" echo "ro.${partition}.build.type=$TARGET_BUILD_TYPE" echo "ro.${partition}.build.version.incremental=$BUILD_NUMBER" -echo "ro.${partition}.build.version.release=$PLATFORM_VERSION" -echo "ro.${partition}.build.version.release_or_codename=$PLATFORM_VERSION_LAST_STABLE" +echo "ro.${partition}.build.version.release=$PLATFORM_VERSION_LAST_STABLE" +echo "ro.${partition}.build.version.release_or_codename=$PLATFORM_VERSION" echo "ro.${partition}.build.version.sdk=$PLATFORM_SDK_VERSION" echo "ro.product.${partition}.brand=$PRODUCT_BRAND"