blob: 4dbc9418243b5373717e5a148d49e9d3f7b9e281 [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 Smundak1d7923e2021-09-14 08:53:10 -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 Crossa45d0c82021-07-20 14:11:20 -070055PLATFORM_VERSION_CODENAME.TP1A := Tiramisu
Colin Crossca0afa32017-02-17 16:28:16 -080056
Dianne Hackborn25648e62019-10-22 15:58:17 -070057ifndef PLATFORM_SDK_VERSION
58 # This is the canonical definition of the SDK version, which defines
59 # the set of APIs and functionality available in the platform. It
60 # is a single integer that increases monotonically as updates to
61 # the SDK are released. It should only be incremented when the APIs for
62 # the new release are frozen (so that developers don't write apps against
63 # intermediate builds). During development, this number remains at the
64 # SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
65 # the code-name of the new development work.
66
67 # When you increment the PLATFORM_SDK_VERSION please ensure you also
68 # clear out the following text file of all older PLATFORM_VERSION's:
69 # cts/tests/tests/os/assets/platform_versions.txt
Jeff Sharkeyfcc2b972021-05-27 08:37:15 -060070 PLATFORM_SDK_VERSION := 31
Dianne Hackborn25648e62019-10-22 15:58:17 -070071endif
72.KATI_READONLY := PLATFORM_SDK_VERSION
73
Anton Hansson2ea7e6e2021-08-26 17:04:01 +010074# This is the sdk extension version of this tree.
Sasha Smundak1d7923e2021-09-14 08:53:10 -070075PLATFORM_SDK_EXTENSION_VERSION := 1
76.KATI_READONLY := PLATFORM_SDK_EXTENSION_VERSION
Anton Hansson2ea7e6e2021-08-26 17:04:01 +010077
78# This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
Anton Hanssonc9b330c2021-09-29 17:11:19 +010079PLATFORM_BASE_SDK_EXTENSION_VERSION := 1
Sasha Smundak1d7923e2021-09-14 08:53:10 -070080.KATI_READONLY := PLATFORM_BASE_SDK_EXTENSION_VERSION
Jiyong Park641b6cc2018-01-15 14:48:40 +090081
Colin Cross63fe36a2017-02-21 17:23:02 -080082ifndef PLATFORM_SECURITY_PATCH
Adam Seatonc63e4292016-08-25 19:46:06 -070083 # Used to indicate the security patch that has been applied to the device.
84 # It must signify that the build includes all security patches issued up through the designated Android Public Security Bulletin.
85 # It must be of the form "YYYY-MM-DD" on production devices.
86 # It must match one of the Android Security Patch Level strings of the Public Security Bulletins.
87 # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
Bassem Khalifed8c52032021-12-09 19:40:23 +000088 PLATFORM_SECURITY_PATCH := 2022-02-05
Dianne Hackborne593e5c2015-08-12 16:11:20 -070089endif
Dan Willemsen693c7fb2018-04-11 10:40:38 -070090.KATI_READONLY := PLATFORM_SECURITY_PATCH
Dianne Hackborne593e5c2015-08-12 16:11:20 -070091
Sasha Smundak1d7923e2021-09-14 08:53:10 -070092include $(BUILD_SYSTEM)/version_util.mk
Tao Bao717d9d32018-05-29 11:18:02 -070093