blob: e31465bfdfa55b996255cb72d4cd4b6bf8db1107 [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001#
2# Copyright (C) 2008 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17#
18# Handle various build version information.
19#
20# Guarantees that the following are defined:
21# PLATFORM_VERSION
22# PLATFORM_SDK_VERSION
Dianne Hackborn9bd54042009-05-15 18:01:20 -070023# PLATFORM_VERSION_CODENAME
24# DEFAULT_APP_TARGET_SDK
The Android Open Source Project88b60792009-03-03 19:28:42 -080025# BUILD_ID
26# BUILD_NUMBER
Adam Seaton8d4fac72016-07-29 11:52:35 -070027# PLATFORM_SECURITY_PATCH
Justin Yun2a233b32017-12-07 17:08:19 +090028# PLATFORM_VNDK_VERSION
Jiyong Park641b6cc2018-01-15 14:48:40 +090029# PLATFORM_SYSTEMSDK_VERSIONS
The Android Open Source Project88b60792009-03-03 19:28:42 -080030#
31
32# Look for an optional file containing overrides of the defaults,
33# but don't cry if we don't find it. We could just use -include, but
34# the build.prop target also wants INTERNAL_BUILD_ID_MAKEFILE to be set
35# if the file exists.
36#
37INTERNAL_BUILD_ID_MAKEFILE := $(wildcard $(BUILD_SYSTEM)/build_id.mk)
Colin Cross63fe36a2017-02-21 17:23:02 -080038ifdef INTERNAL_BUILD_ID_MAKEFILE
The Android Open Source Project88b60792009-03-03 19:28:42 -080039 include $(INTERNAL_BUILD_ID_MAKEFILE)
40endif
41
Colin Cross5e9ba922021-05-13 16:31:13 -070042DEFAULT_PLATFORM_VERSION := TP1A
Sasha Smundak04476222021-09-05 19:06:18 -070043.KATI_READONLY := DEFAULT_PLATFORM_VERSION
Colin Cross5e9ba922021-05-13 16:31:13 -070044MIN_PLATFORM_VERSION := TP1A
45MAX_PLATFORM_VERSION := TP1A
Colin Cross88737132017-03-21 17:41:03 -070046
Dianne Hackborn25648e62019-10-22 15:58:17 -070047# The last stable version name of the platform that was released. During
48# development, this stays at that previous version, while the codename indicates
49# further work based on the previous version.
Jeff Sharkeyfcc2b972021-05-27 08:37:15 -060050PLATFORM_VERSION_LAST_STABLE := 12
Dianne Hackborn25648e62019-10-22 15:58:17 -070051.KATI_READONLY := PLATFORM_VERSION_LAST_STABLE
Colin Crossca0afa32017-02-17 16:28:16 -080052
Ian Pedowitz0a06d8b2017-04-18 23:25:01 +000053# These are the current development codenames, if the build is not a final
54# release build. If this is a final release build, it is simply "REL".
Colin Crossca3dc562021-08-03 11:18:57 -070055PLATFORM_VERSION_CODENAME.SP2A := Sv2
Colin Crossa45d0c82021-07-20 14:11:20 -070056PLATFORM_VERSION_CODENAME.TP1A := Tiramisu
Colin Crossca0afa32017-02-17 16:28:16 -080057
Dianne Hackborn25648e62019-10-22 15:58:17 -070058ifndef PLATFORM_SDK_VERSION
59 # This is the canonical definition of the SDK version, which defines
60 # the set of APIs and functionality available in the platform. It
61 # is a single integer that increases monotonically as updates to
62 # the SDK are released. It should only be incremented when the APIs for
63 # the new release are frozen (so that developers don't write apps against
64 # intermediate builds). During development, this number remains at the
65 # SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
66 # the code-name of the new development work.
67
68 # When you increment the PLATFORM_SDK_VERSION please ensure you also
69 # clear out the following text file of all older PLATFORM_VERSION's:
70 # cts/tests/tests/os/assets/platform_versions.txt
Jeff Sharkeyfcc2b972021-05-27 08:37:15 -060071 PLATFORM_SDK_VERSION := 31
Dianne Hackborn25648e62019-10-22 15:58:17 -070072endif
73.KATI_READONLY := PLATFORM_SDK_VERSION
74
Anton Hansson2ea7e6e2021-08-26 17:04:01 +010075# This is the sdk extension version of this tree.
Sasha Smundak04476222021-09-05 19:06:18 -070076PLATFORM_SDK_EXTENSION_VERSION := 1
77.KATI_READONLY := PLATFORM_SDK_EXTENSION_VERSION
Anton Hansson2ea7e6e2021-08-26 17:04:01 +010078
79# This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
Anton Hanssonc9b330c2021-09-29 17:11:19 +010080PLATFORM_BASE_SDK_EXTENSION_VERSION := 1
Sasha Smundak04476222021-09-05 19:06:18 -070081.KATI_READONLY := PLATFORM_BASE_SDK_EXTENSION_VERSION
Jiyong Park641b6cc2018-01-15 14:48:40 +090082
Colin Cross63fe36a2017-02-21 17:23:02 -080083ifndef PLATFORM_SECURITY_PATCH
Adam Seatonc63e4292016-08-25 19:46:06 -070084 # Used to indicate the security patch that has been applied to the device.
85 # It must signify that the build includes all security patches issued up through the designated Android Public Security Bulletin.
86 # It must be of the form "YYYY-MM-DD" on production devices.
87 # It must match one of the Android Security Patch Level strings of the Public Security Bulletins.
88 # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
Paul Scovanner948f7fa2021-09-14 23:27:03 +000089 PLATFORM_SECURITY_PATCH := 2021-11-05
Dan Willemsenccc933e2015-08-11 15:25:12 -070090endif
91
Sasha Smundak04476222021-09-05 19:06:18 -070092include $(BUILD_SYSTEM)/version_util.mk