Merge "Ensure APEX's Java deps use stable SDKs."

This commit is contained in:
satayev
2020-05-04 16:03:44 +00:00
committed by Gerrit Code Review
4 changed files with 150 additions and 2 deletions

View File

@@ -86,6 +86,14 @@ func RegisterJavaBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterSingletonType("kythe_java_extract", kytheExtractJavaFactory)
}
func (j *Module) CheckStableSdkVersion() error {
sdkVersion := j.sdkVersion()
if sdkVersion.stable() {
return nil
}
return fmt.Errorf("non stable SDK %v", sdkVersion)
}
func (j *Module) checkSdkVersions(ctx android.ModuleContext) {
if j.SocSpecific() || j.DeviceSpecific() ||
(j.ProductSpecific() && ctx.Config().EnforceProductPartitionInterface()) {