blob: 543060d2b9d897299f55fbbcf117754f2f1a16a7 [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 Cross6e40ac22023-01-18 13:47:11 -080043DEFAULT_PLATFORM_VERSION := VP1A
Sasha Smundak04476222021-09-05 19:06:18 -070044.KATI_READONLY := DEFAULT_PLATFORM_VERSION
Colin Cross3a445ab2022-06-08 10:01:22 -070045MIN_PLATFORM_VERSION := UP1A
Colin Cross6e40ac22023-01-18 13:47:11 -080046MAX_PLATFORM_VERSION := VP1A
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.
Yurii Zubrytskyi97191b22022-04-04 16:35:14 -070051PLATFORM_VERSION_LAST_STABLE := 13
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 Cross29919e32022-02-24 13:40:46 -080056PLATFORM_VERSION_CODENAME.UP1A := UpsideDownCake
Colin Cross6e40ac22023-01-18 13:47:11 -080057PLATFORM_VERSION_CODENAME.VP1A := VanillaIceCream
Colin Crossca0afa32017-02-17 16:28:16 -080058
Colin Crossa4925442022-02-28 18:01:35 -080059# This is the user-visible version. In a final release build it should
60# be empty to use PLATFORM_VERSION as the user-visible version. For
61# a preview release it can be set to a user-friendly value like `12 Preview 1`
62PLATFORM_DISPLAY_VERSION :=
63
Dianne Hackborn25648e62019-10-22 15:58:17 -070064ifndef PLATFORM_SDK_VERSION
65 # This is the canonical definition of the SDK version, which defines
66 # the set of APIs and functionality available in the platform. It
67 # is a single integer that increases monotonically as updates to
68 # the SDK are released. It should only be incremented when the APIs for
69 # the new release are frozen (so that developers don't write apps against
70 # intermediate builds). During development, this number remains at the
71 # SDK version the branch is based on and PLATFORM_VERSION_CODENAME holds
72 # the code-name of the new development work.
73
74 # When you increment the PLATFORM_SDK_VERSION please ensure you also
75 # clear out the following text file of all older PLATFORM_VERSION's:
76 # cts/tests/tests/os/assets/platform_versions.txt
Yurii Zubrytskyi97191b22022-04-04 16:35:14 -070077 PLATFORM_SDK_VERSION := 33
Dianne Hackborn25648e62019-10-22 15:58:17 -070078endif
79.KATI_READONLY := PLATFORM_SDK_VERSION
80
Anton Hansson2ea7e6e2021-08-26 17:04:01 +010081# This is the sdk extension version of this tree.
Gurpreet Singh03fbfe72022-11-01 17:00:22 +000082PLATFORM_SDK_EXTENSION_VERSION := 5
Sasha Smundak04476222021-09-05 19:06:18 -070083.KATI_READONLY := PLATFORM_SDK_EXTENSION_VERSION
Anton Hansson2ea7e6e2021-08-26 17:04:01 +010084
85# This is the sdk extension version that PLATFORM_SDK_VERSION ships with.
MÃ¥rten Kongstad44104202022-09-19 12:36:32 +020086PLATFORM_BASE_SDK_EXTENSION_VERSION := $(PLATFORM_SDK_EXTENSION_VERSION)
Sasha Smundak04476222021-09-05 19:06:18 -070087.KATI_READONLY := PLATFORM_BASE_SDK_EXTENSION_VERSION
Jiyong Park641b6cc2018-01-15 14:48:40 +090088
satayevda1e41d2022-03-16 14:27:01 +000089# This are all known codenames.
90PLATFORM_VERSION_KNOWN_CODENAMES := \
91Base Base11 Cupcake Donut Eclair Eclair01 EclairMr1 Froyo Gingerbread GingerbreadMr1 \
92Honeycomb HoneycombMr1 HoneycombMr2 IceCreamSandwich IceCreamSandwichMr1 \
93JellyBean JellyBeanMr1 JellyBeanMr2 Kitkat KitkatWatch Lollipop LollipopMr1 M N NMr1 O OMr1 P \
Colin Cross6e40ac22023-01-18 13:47:11 -080094Q R S Sv2 Tiramisu UpsideDownCake VanillaIceCream
satayevda1e41d2022-03-16 14:27:01 +000095
satayev2d945862022-02-09 21:59:28 +000096# Convert from space separated list to comma separated
97PLATFORM_VERSION_KNOWN_CODENAMES := \
98 $(call normalize-comma-list,$(PLATFORM_VERSION_KNOWN_CODENAMES))
99.KATI_READONLY := PLATFORM_VERSION_KNOWN_CODENAMES
100
Colin Cross63fe36a2017-02-21 17:23:02 -0800101ifndef PLATFORM_SECURITY_PATCH
Adam Seatonc63e4292016-08-25 19:46:06 -0700102 # Used to indicate the security patch that has been applied to the device.
103 # It must signify that the build includes all security patches issued up through the designated Android Public Security Bulletin.
104 # It must be of the form "YYYY-MM-DD" on production devices.
105 # It must match one of the Android Security Patch Level strings of the Public Security Bulletins.
106 # If there is no $PLATFORM_SECURITY_PATCH set, keep it empty.
Steve Berbary465700d2023-01-13 18:17:59 +0000107 PLATFORM_SECURITY_PATCH := 2023-03-05
Dan Willemsenccc933e2015-08-11 15:25:12 -0700108endif
109
Sasha Smundak04476222021-09-05 19:06:18 -0700110include $(BUILD_SYSTEM)/version_util.mk