Merge "Allow missing java_sdk_library files in AllowMissingDependencies builds"
This commit is contained in:
@@ -104,6 +104,7 @@ type DefaultableHookContext interface {
|
||||
EarlyModuleContext
|
||||
|
||||
CreateModule(ModuleFactory, ...interface{}) Module
|
||||
AddMissingDependencies(missingDeps []string)
|
||||
}
|
||||
|
||||
type DefaultableHook func(ctx DefaultableHookContext)
|
||||
|
@@ -1629,8 +1629,12 @@ func (module *SdkLibrary) CreateInternalModules(mctx android.DefaultableHookCont
|
||||
path := path.Join(mctx.ModuleDir(), apiDir, scope.apiFilePrefix+api)
|
||||
p := android.ExistentPathForSource(mctx, path)
|
||||
if !p.Valid() {
|
||||
mctx.ModuleErrorf("Current api file %#v doesn't exist", path)
|
||||
missingCurrentApi = true
|
||||
if mctx.Config().AllowMissingDependencies() {
|
||||
mctx.AddMissingDependencies([]string{path})
|
||||
} else {
|
||||
mctx.ModuleErrorf("Current api file %#v doesn't exist", path)
|
||||
missingCurrentApi = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user