Enforce hidden apis usage in product(soong)

Only if PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is set,
every app and java library in product cannot use hidden APIs anymore.

checkSdkVersion() checks if sdk_version of app and library is narrow enough,
checkLinkType() checks every library that app links agianst

Bug: 132780927
Test: m
Test: set PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE, and check whether build
error occurs.
Change-Id: Ic630503b875040f730feda4fef826ed6d71da111
This commit is contained in:
Jeongik Cha
2019-10-29 15:44:45 +09:00
parent af60d490ff
commit 2cc570dc63
8 changed files with 98 additions and 31 deletions

View File

@@ -520,7 +520,7 @@ type AARImport struct {
}
func (a *AARImport) sdkVersion() string {
return proptools.StringDefault(a.properties.Sdk_version, defaultSdkVersion(a))
return String(a.properties.Sdk_version)
}
func (a *AARImport) systemModules() string {