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

Commit 300f0388 authored by Colin Cross's avatar Colin Cross
Browse files

Only add SDK file dependencies on device builds

Dependencies on sdk_vcurrent, etc. should only be added to java
modules that are building for the device.

Test: aosp-build-tools build
Change-Id: I01abba94fed8b470085529092263f4634dec229c
parent fd4795f5
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -571,6 +571,7 @@ func checkLinkType(ctx android.ModuleContext, from *Module, to *Library, tag dep
func (j *Module) collectDeps(ctx android.ModuleContext) deps {
	var deps deps

	if ctx.Device() {
		sdkDep := decodeSdkDep(ctx, String(j.deviceProperties.Sdk_version))
		if sdkDep.invalidVersion {
			ctx.AddMissingDependencies([]string{sdkDep.module})
@@ -579,6 +580,7 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
			deps.classpath = append(deps.classpath, sdkDep.jar)
			deps.aidlIncludeDirs = append(deps.aidlIncludeDirs, sdkDep.aidl)
		}
	}

	ctx.VisitDirectDeps(func(module android.Module) {
		otherName := ctx.OtherModuleName(module)