diff options
author | Jiyong Park <jiyong@google.com> | 2018-01-15 15:05:10 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2018-01-19 15:42:18 +0900 |
commit | 1a5d7b1539c1834c731de035e4f9c5e95ddc8e70 (patch) | |
tree | f796efd19f31354dc6e96cd4572fadde98deabbc /android/config.go | |
parent | 64946fec54ab602abd2ea73e3eb590b97bfd03e5 (diff) | |
download | build_soong-1a5d7b1539c1834c731de035e4f9c5e95ddc8e70.tar.gz build_soong-1a5d7b1539c1834c731de035e4f9c5e95ddc8e70.tar.bz2 build_soong-1a5d7b1539c1834c731de035e4f9c5e95ddc8e70.zip |
Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS
PLATFORM_SYSTEMSDK_VERSIONS is the list of System SDK versions that the
platform is supporting. Contrary to the public SDK where platform
essentially supports all previous SDK versions, platform support only a
few recent System SDK versions, since some of old System APIs are
gradually deprecated, removed from the following SDKs and then finally
deleted from the platform. This will be part of the framework manifest.
The list can be specified by setting PLATFORM_SYSTEMSDK_MIN_VERSION. If
it is set to an old version number, then System SDKs from the version
to the current version (PLATFORM_SDK_VERSION) are considered to be
supported by the platform. If PLATFORM_SYSTEMSDK_MIN_VERSION is not set,
only the latest System SDK version is supported.
Next, BOARD_SYSTEMSDK_VERSIONS is the list of System SDK versions that
the device is using. This is put to the device compatibility matrix
device is using. The device and the platform is considered as compatible
only BOARD_SYSTEMSDK_VERSIONS in the device compatibility matrix are
in the PLATFORM_SYSTEMSDK_VERSIONS in the framework manifest.
When BOARD_SYSTEMSDK_VERSIONS is set, a Java app or library in vendor or
odm partitions which didn't specify LOCAL_SDK_VERSION is forced to use
System SDK. Also, the build system does the additional integrity check
to ensure that LOCAL_SDK_VERSION is within BOARD_SYSTEMSDK_VERSIONS or
PLATFORM_SYSTEMSDK_VERSIONS (if BOARD_SYSTEMSDK_VERSIONS isn't set).
Bug: 69088799
Test: m -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m -j
Change-Id: Id38f02b4be86710411be22bc28109e6894f8a483
Diffstat (limited to 'android/config.go')
-rw-r--r-- | android/config.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/android/config.go b/android/config.go index 43d743b6..2ce7f486 100644 --- a/android/config.go +++ b/android/config.go @@ -31,6 +31,7 @@ import ( var Bool = proptools.Bool var String = proptools.String +var FutureApiLevel = 10000 // The configuration file name const configFileName = "soong.config" @@ -453,7 +454,7 @@ func (c *config) DefaultAppTargetSdkInt() int { if Bool(c.ProductVariables.Platform_sdk_final) { return c.PlatformSdkVersionInt() } else { - return 10000 + return FutureApiLevel } } @@ -657,6 +658,17 @@ func (c *deviceConfig) ExtraVndkVersions() []string { return c.config.ProductVariables.ExtraVndkVersions } +func (c *deviceConfig) SystemSdkVersions() []string { + if c.config.ProductVariables.DeviceSystemSdkVersions == nil { + return nil + } + return *c.config.ProductVariables.DeviceSystemSdkVersions +} + +func (c *deviceConfig) PlatformSystemSdkVersions() []string { + return c.config.ProductVariables.Platform_systemsdk_versions +} + func (c *deviceConfig) OdmPath() string { if c.config.ProductVariables.OdmPath != nil { return *c.config.ProductVariables.OdmPath |