summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/java/java.go b/java/java.go
index a546cd524..4c6a5a5ac 100644
--- a/java/java.go
+++ b/java/java.go
@@ -500,6 +500,14 @@ var (
usesLibTag = dependencyTag{name: "uses-library"}
)
+func IsLibDepTag(depTag blueprint.DependencyTag) bool {
+ return depTag == libTag
+}
+
+func IsStaticLibDepTag(depTag blueprint.DependencyTag) bool {
+ return depTag == staticLibTag
+}
+
type sdkDep struct {
useModule, useFiles, useDefaultLibs, invalidVersion bool
@@ -619,12 +627,9 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
}
linkType, _ := j.getLinkType(ctx.ModuleName())
- if linkType == javaSystem {
+ // only platform modules can use internal props
+ if linkType != javaPlatform {
ret[idx] = stub
- } else if linkType != javaPlatform {
- ctx.PropertyErrorf("sdk_version",
- "can't link against sysprop_library %q from a module using public or core API",
- lib)
}
}