Merge "Add path valid check" am: 10d21fdcb9 am: 24801a3980

am: 37eed8fc81

Change-Id: I84e99e95c5a5e95ea105733b0ca8b88d61f1d033
This commit is contained in:
Sundong Ahn 2019-02-28 19:04:47 -08:00 committed by android-build-merger
commit c7ff2701a1
1 changed files with 4 additions and 0 deletions

View File

@ -607,6 +607,10 @@ func (module *SdkLibrary) PrebuiltJars(ctx android.BaseContext, sdkVersion strin
dir := filepath.Join("prebuilts", "sdk", v, api)
jar := filepath.Join(dir, module.BaseModuleName()+".jar")
jarPath := android.ExistentPathForSource(ctx, jar)
if !jarPath.Valid() {
ctx.PropertyErrorf("sdk_library", "invalid sdk version %q, %q does not exist", v, jar)
return nil
}
return android.Paths{jarPath.Path()}
}