Handle prebuiltDepTag for java modules

When there is a prebuilt java lib defined and there is a java library
with the same name, the reverse dependency from the java lib to the
prebuilt lib is added. However, the java library didn't recognize the
dependency type and causes error. Fixing the problem by not panicking on
such dependency.

Test: m -j
Test: m -j dist DIST_DIR=out/dist ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Merged-In: I79673b2bb382100e42c5336e8041daa8c86fa857
Change-Id: I79673b2bb382100e42c5336e8041daa8c86fa857
(cherry picked from commit 46dbf9c63e)
This commit is contained in:
Jiyong Park
2018-03-23 21:02:38 +09:00
parent 8e10408ccf
commit 924d35b926

View File

@@ -19,7 +19,6 @@ package java
// is handled in builder.go // is handled in builder.go
import ( import (
"fmt"
"path/filepath" "path/filepath"
"strconv" "strconv"
"strings" "strings"
@@ -646,8 +645,6 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
} }
case kotlinStdlibTag: case kotlinStdlibTag:
deps.kotlinStdlib = dep.HeaderJars() deps.kotlinStdlib = dep.HeaderJars()
default:
panic(fmt.Errorf("unknown dependency %q for %q", otherName, ctx.ModuleName()))
} }
deps.aidlIncludeDirs = append(deps.aidlIncludeDirs, dep.AidlIncludeDirs()...) deps.aidlIncludeDirs = append(deps.aidlIncludeDirs, dep.AidlIncludeDirs()...)