blob: f19e841ec98c099a6c6149b4d66ca18fc0e413b0 [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
Colin Crossa4925442022-02-28 18:01:35 -080022# PLATFORM_DISPLAY_VERSION
The Android Open Source Project88b60792009-03-03 19:28:42 -080023# PLATFORM_SDK_VERSION
Dianne Hackborn9bd54042009-05-15 18:01:20 -070024# PLATFORM_VERSION_CODENAME
25# DEFAULT_APP_TARGET_SDK
The Android Open Source Project88b60792009-03-03 19:28:42 -080026# BUILD_ID
27# BUILD_NUMBER
Adam Seaton8d4fac72016-07-29 11:52:35 -070028# PLATFORM_SECURITY_PATCH
Justin Yun2a233b32017-12-07 17:08:19 +090029# PLATFORM_VNDK_VERSION
Jiyong Park641b6cc2018-01-15 14:48:40 +090030# PLATFORM_SYSTEMSDK_VERSIONS
The Android Open Source Project88b60792009-03-03 19:28:42 -080031#
32
33# Look for an optional file containing overrides of the defaults,
34# but don't cry if we don't find it. We could just use -include, but
35# the build.prop target also wants INTERNAL_BUILD_ID_MAKEFILE to be set
36# if the file exists.
37#
38INTERNAL_BUILD_ID_MAKEFILE := $(wildcard $(BUILD_SYSTEM)/build_id.mk)
Colin Cross63fe36a2017-02-21 17:23:02 -080039ifdef INTERNAL_BUILD_ID_MAKEFILE
The Android Open Source Project88b60792009-03-03 19:28:42 -080040 include $(INTERNAL_BUILD_ID_MAKEFILE)
41endif
42
Colin Cross5e9ba922021-05-13 16:31:13 -070043DEFAULT_PLATFORM_VERSION := TP1A
Sasha Smundak1d7923e2021-09-14 08:53:10 -070044.KATI_READONLY := DEFAULT_PLATFORM_VERSION
Colin Cross5e9ba922021-05-13 16:31:13 -070045MIN_PLATFORM_VERSION := TP1A
46MAX_PLATFORM_VERSION := TP1A
Colin Cross88737132017-03-21 17:41:03 -070047
Dianne Hackborn25648e62019-10-22 15:58:17 -070048# The last stable version name of the platform that was released. During
49# development, this stays at that previous version, while the codename indicates
50# further work based on the previous version.
Jeff Sharkeyfcc2b972021-05-27 08:37:15 -060051PLATFORM_VERSION_LAST_STABLE := 12
Dianne Hackborn25648e62019-10-22 15:58:17 -070052.KATI_READONLY := PLATFORM_VERSION_LAST_STABLE
Colin Crossca0afa32017-02-17 16:28:16 -080053
Ian Pedowitz0a06d8b2017-04-18 23:25:01 +000054# These are the current development codenames, if the build is not a final
55# release build. If this is a final release build, it is simply "REL".
Colin Crossa45d0c82021-07-20 14:11:20 -070056PLATFORM_VERSION_CODENAME.TP1A := Tiramisu
Colin Crossca0afa32017-02-17 16:28:16 -080057
Colin Crossa4925442022-02-28 18:01:35 -080058# This is the user-visible version. In a final release build it should
59# be empty to use PLATFORM_VERSION as the user-visible version. For
60# a preview release it can be set to a user-friendly value like `12 Preview 1`
61PLATFORM_DISPLAY_VERSION :=
62
Dianne Hackborn25648e62019-10-22 15:58:17 -070063ifndef PLATFORM_SDK_VERSION
64 # This is the canonical definition of the SDK version, which defines
65 # the set of APIs and functionality available in the platform. It
66 # is a single integer that increases monotonically as updates to
67 # the SDK are released. It should only be incremented when the APIs for
68 # the new release are frozen (so that developers don't write apps against
69 # intermediate builds). During development, this number remains at the
70 # SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
71 # the code-name of the new development work.
72
73 # When you increment the PLATFORM_SDK_VERSION please ensure you also
74 # clear out the following text file of all older PLATFORM_VERSION's:
75 # cts/tests/tests/os/assets/platform_versions.txt
Jeff Sharkeyfcc2b972021-05-27 08:37:15 -060076 PLATFORM_SDK_VERSION := 31
Dianne Hackborn25648e62019-10-22 15:58:17 -070077endif
78.KATI_READONLY := PLATFORM_SDK_VERSION
79
Anton Hansson2ea7e6e2021-08-26 17:04:01 +010080# This is the sdk extension version of this tree.
Sasha Smundak1d7923e2021-09-14 08:53:10 -070081PLATFORM_SDK_EXTENSION_VERSION := 1
82.KATI_READONLY := PLATFORM_SDK_EXTENSION_VERSION
Anton Hansson2ea7e6e2021-08-26 17:04:01 +010083
84# This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
Anton Hanssonc9b330c2021-09-29 17:11:19 +010085PLATFORM_BASE_SDK_EXTENSION_VERSION := 1
Sasha Smundak1d7923e2021-09-14 08:53:10 -070086.KATI_READONLY := PLATFORM_BASE_SDK_EXTENSION_VERSION
Jiyong Park641b6cc2018-01-15 14:48:40 +090087
satayev2d945862022-02-09 21:59:28 +000088# This is are all known codenames starting from Q.
89PLATFORM_VERSION_KNOWN_CODENAMES := Q R S Sv2 Tiramisu
90# Convert from space separated list to comma separated
91PLATFORM_VERSION_KNOWN_CODENAMES := \
92 $(call normalize-comma-list,$(PLATFORM_VERSION_KNOWN_CODENAMES))
93.KATI_READONLY := PLATFORM_VERSION_KNOWN_CODENAMES
94
Colin Cross63fe36a2017-02-21 17:23:02 -080095ifndef PLATFORM_SECURITY_PATCH
Adam Seatonc63e4292016-08-25 19:46:06 -070096 # Used to indicate the security patch that has been applied to the device.
97 # It must signify that the build includes all security patches issued up through the designated Android Public Security Bulletin.
98 # It must be of the form "YYYY-MM-DD" on production devices.
99 # It must match one of the Android Security Patch Level strings of the Public Security Bulletins.
100 # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
Bassem Khalifed8c52032021-12-09 19:40:23 +0000101 PLATFORM_SECURITY_PATCH := 2022-02-05
Dianne Hackborne593e5c2015-08-12 16:11:20 -0700102endif
Dan Willemsen693c7fb2018-04-11 10:40:38 -0700103.KATI_READONLY := PLATFORM_SECURITY_PATCH
Dianne Hackborne593e5c2015-08-12 16:11:20 -0700104
Sasha Smundak1d7923e2021-09-14 08:53:10 -0700105include $(BUILD_SYSTEM)/version_util.mk
Tao Bao717d9d32018-05-29 11:18:02 -0700106