| # 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.in_development_api_level. |
| 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 |
| |
| # Valid values are either false (Default), or a list contains only `supported` |
| # or `in development` API levels listed in //sdk/version_history.json file. |
| # By default, all supported and in development API levels defined in |
| # //sdk/version_history.json will be built. If you only want to build |
| # artifacts targeting API level PLATFORM, override this with `[]`. |
| # |
| # This will help reduce the overall build time of any product/driver that uses |
| # Bazel SDK, or final_fuchsia_idk. For example, a vim3 build can be shorten |
| # from 16 mins to 10 mins. |
| override_build_time_supported_api_levels = false |
| } |
| |
| if (override_build_time_supported_api_levels != false) { |
| platform_version.build_time_supported_api_levels = |
| override_build_time_supported_api_levels |
| } |