Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44fc5bf5 authored by Jerome Gaillard's avatar Jerome Gaillard
Browse files

Handle missing dependencies in ravenwood.go

This otherwise causes a crash when attempting any build
on macOS.

Test: build on macOS
Change-Id: Ib69160cd798091ae5f45416f332a0ea9927e1e50
parent e1234e51
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -285,6 +285,14 @@ func (r *ravenwoodLibgroup) GenerateAndroidBuildActions(ctx android.ModuleContex
	installPath := android.PathForModuleInstall(ctx, r.BaseModuleName())
	for _, lib := range r.ravenwoodLibgroupProperties.Libs {
		libModule := ctx.GetDirectDepWithTag(lib, ravenwoodLibContentTag)
		if libModule == nil {
			if ctx.Config().AllowMissingDependencies() {
				ctx.AddMissingDependencies([]string{lib})
			} else {
				ctx.PropertyErrorf("lib", "missing dependency %q", lib)
			}
			continue
		}
		libJar := android.OutputFileForModule(ctx, libModule, "")
		ctx.InstallFile(installPath, lib+".jar", libJar)
	}