Rework platform version to hide codenames.
The public platform version no longer can be a codename, it is always the most recently released platform. A new build property and API provides either the offical version or the current codename as appropriate. This will avoid breaking apps that look at the platform version while development is under a codename. Bug: 143175463 Test: manual Change-Id: Ia57c08e04ecf5680a231af96c4c458d5dc794f59
This commit is contained in:
@@ -423,6 +423,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_LAST_STABLE)" \
|
||||
PLATFORM_SECURITY_PATCH="$(PLATFORM_SECURITY_PATCH)" \
|
||||
PLATFORM_BASE_OS="$(PLATFORM_BASE_OS)" \
|
||||
PLATFORM_SDK_VERSION="$(PLATFORM_SDK_VERSION)" \
|
||||
|
@@ -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
|
||||
|
@@ -11,7 +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=$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"
|
||||
|
Reference in New Issue
Block a user