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
This commit is contained in:
parent
fd4795f58c
commit
300f038848
16
java/java.go
16
java/java.go
|
@ -571,13 +571,15 @@ func checkLinkType(ctx android.ModuleContext, from *Module, to *Library, tag dep
|
||||||
func (j *Module) collectDeps(ctx android.ModuleContext) deps {
|
func (j *Module) collectDeps(ctx android.ModuleContext) deps {
|
||||||
var deps deps
|
var deps deps
|
||||||
|
|
||||||
sdkDep := decodeSdkDep(ctx, String(j.deviceProperties.Sdk_version))
|
if ctx.Device() {
|
||||||
if sdkDep.invalidVersion {
|
sdkDep := decodeSdkDep(ctx, String(j.deviceProperties.Sdk_version))
|
||||||
ctx.AddMissingDependencies([]string{sdkDep.module})
|
if sdkDep.invalidVersion {
|
||||||
} else if sdkDep.useFiles {
|
ctx.AddMissingDependencies([]string{sdkDep.module})
|
||||||
// sdkDep.jar is actually equivalent to turbine header.jar.
|
} else if sdkDep.useFiles {
|
||||||
deps.classpath = append(deps.classpath, sdkDep.jar)
|
// sdkDep.jar is actually equivalent to turbine header.jar.
|
||||||
deps.aidlIncludeDirs = append(deps.aidlIncludeDirs, sdkDep.aidl)
|
deps.classpath = append(deps.classpath, sdkDep.jar)
|
||||||
|
deps.aidlIncludeDirs = append(deps.aidlIncludeDirs, sdkDep.aidl)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.VisitDirectDeps(func(module android.Module) {
|
ctx.VisitDirectDeps(func(module android.Module) {
|
||||||
|
|
Loading…
Reference in New Issue