blob: f8dc091202980e4414eb16a663485d89a0331e25 [file] [log] [blame]
# Copyright 2021 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file should only be imported by build files that need to know the current
# set of API levels or to update that set. This includes IDK, SDK, and FIDL.
# For the target API level of the current build, see
# //build/config/fuchsia/target_api_level.gni.
_script = "get_platform_version.py"
version_history_path = "//sdk/version_history.json"
_process_versions_args = [
"-S", # https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=62771
rebase_path(_script, root_build_dir),
"--version-history-path",
rebase_path(version_history_path, root_build_dir),
]
platform_version =
exec_script(python_exe_src, _process_versions_args, "json", [ _script ])
declare_args() {
# If true, build for N+1 api level, where N is
# platform_version.deprecated_highest_numbered_api_level.
# TODO(https://fxbug.dev/326277078): Update this comment and potentially
# redefine these args when switching the in-development level to "NEXT".
bump_api_level = false
freeze_api_level = false
}
declare_args() {
assert(!freeze_api_level || !bump_api_level,
"freeze_api_level and bump_api_level shouldn't be used together")
# If true, generate golden files for next api level. This is used by
# platform-version-roller when the API level is incremented.
include_next_api_level = bump_api_level
api_compatibility_testing = !bump_api_level
# Overrides the set of API levels for which the build will provide build-time
# support in the IDK/SDK. The default (`false`) set is all `supported` and
# `in development` API levels in //sdk/version_history.json. Other valid
# values are a list containing a subset of the default set. To build
# artifacts targeting API level PLATFORM, set to `[]`.
#
# This is useful for reducing the overall build time of any build that
# includes the IDK/SDK in exchange for reduced coverage of API level support.
# This includes `fx build final_fuchsia_idk` and products built in-tree.
#
# To override the set of target CPUs, see `override_idk_target_cpus`.
override_build_time_supported_api_levels = false
}
if (override_build_time_supported_api_levels != false) {
platform_version.build_time_supported_api_levels = []
platform_version.build_time_supported_api_levels =
override_build_time_supported_api_levels
}