diff options
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/java/java.go b/java/java.go index b4b8feb23..7ef3626d6 100644 --- a/java/java.go +++ b/java/java.go @@ -95,9 +95,6 @@ type CompilerProperties struct { // list of java libraries that will be compiled into the resulting jar Static_libs []string `android:"arch_variant"` - // list of native libraries that will be provided in or alongside the resulting jar - Jni_libs []string `android:"arch_variant"` - // manifest file to be included in resulting jar Manifest *string @@ -365,6 +362,11 @@ type dependencyTag struct { name string } +type jniDependencyTag struct { + blueprint.BaseDependencyTag + target android.Target +} + var ( staticLibTag = dependencyTag{name: "staticlib"} libTag = dependencyTag{name: "javalib"} @@ -389,6 +391,12 @@ type sdkDep struct { aidl android.Path } +type jniLib struct { + name string + path android.Path + target android.Target +} + func (j *Module) shouldInstrument(ctx android.BaseContext) bool { return j.properties.Instrument && ctx.Config().IsEnvTrue("EMMA_INSTRUMENT") } @@ -597,6 +605,7 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) { ctx.AddFarVariationDependencies([]blueprint.Variation{ {Mutator: "arch", Variation: ctx.Config().BuildOsCommonVariant}, }, annoTag, j.properties.Annotation_processors...) + android.ExtractSourcesDeps(ctx, j.properties.Srcs) android.ExtractSourcesDeps(ctx, j.properties.Exclude_srcs) android.ExtractSourcesDeps(ctx, j.properties.Java_resources) @@ -787,6 +796,11 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps { otherName := ctx.OtherModuleName(module) tag := ctx.OtherModuleDependencyTag(module) + if _, ok := tag.(*jniDependencyTag); ok { + // Handled by AndroidApp.collectJniDeps + return + } + if to, ok := module.(*Library); ok { switch tag { case bootClasspathTag, libTag, staticLibTag: |