Add base sdk extension version to the config

So that it can be used by prebuilt_apis in follow-up CLs.

Bug: 220086085
Test: m nothing && inspect soong.variables
Change-Id: If987b8aef9802c52a751ea5351cab2a3df6f2e00
This commit is contained in:
Anton Hansson 2022-02-16 16:15:10 +00:00
parent d107272436
commit 97d0bae750
2 changed files with 22 additions and 12 deletions

View file

@ -350,18 +350,19 @@ func TestConfig(buildDir string, env map[string]string, bp string, fs map[string
config := &config{
productVariables: productVariables{
DeviceName: stringPtr("test_device"),
Platform_sdk_version: intPtr(30),
Platform_sdk_codename: stringPtr("S"),
Platform_version_active_codenames: []string{"S", "Tiramisu"},
DeviceSystemSdkVersions: []string{"14", "15"},
Platform_systemsdk_versions: []string{"29", "30"},
AAPTConfig: []string{"normal", "large", "xlarge", "hdpi", "xhdpi", "xxhdpi"},
AAPTPreferredConfig: stringPtr("xhdpi"),
AAPTCharacteristics: stringPtr("nosdcard"),
AAPTPrebuiltDPI: []string{"xhdpi", "xxhdpi"},
UncompressPrivAppDex: boolPtr(true),
ShippingApiLevel: stringPtr("30"),
DeviceName: stringPtr("test_device"),
Platform_sdk_version: intPtr(30),
Platform_sdk_codename: stringPtr("S"),
Platform_base_sdk_extension_version: intPtr(1),
Platform_version_active_codenames: []string{"S", "Tiramisu"},
DeviceSystemSdkVersions: []string{"14", "15"},
Platform_systemsdk_versions: []string{"29", "30"},
AAPTConfig: []string{"normal", "large", "xlarge", "hdpi", "xhdpi", "xxhdpi"},
AAPTPreferredConfig: stringPtr("xhdpi"),
AAPTCharacteristics: stringPtr("nosdcard"),
AAPTPrebuiltDPI: []string{"xhdpi", "xxhdpi"},
UncompressPrivAppDex: boolPtr(true),
ShippingApiLevel: stringPtr("30"),
},
outDir: buildDir,
@ -742,6 +743,14 @@ func (c *config) PlatformSdkCodename() string {
return String(c.productVariables.Platform_sdk_codename)
}
func (c *config) PlatformSdkExtensionVersion() int {
return *c.productVariables.Platform_sdk_extension_version
}
func (c *config) PlatformBaseSdkExtensionVersion() int {
return *c.productVariables.Platform_base_sdk_extension_version
}
func (c *config) PlatformSecurityPatch() string {
return String(c.productVariables.Platform_security_patch)
}

View file

@ -191,6 +191,7 @@ type productVariables struct {
Platform_sdk_version_or_codename *string `json:",omitempty"`
Platform_sdk_final *bool `json:",omitempty"`
Platform_sdk_extension_version *int `json:",omitempty"`
Platform_base_sdk_extension_version *int `json:",omitempty"`
Platform_version_active_codenames []string `json:",omitempty"`
Platform_vndk_version *string `json:",omitempty"`
Platform_systemsdk_versions []string `json:",omitempty"`