Loading apex/apex.go +1 −1 Original line number Diff line number Diff line Loading @@ -1216,7 +1216,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { if am, ok := child.(android.ApexModule); ok { // We cannot use a switch statement on `depTag` here as the checked // tags used below are private (e.g. `cc.sharedDepTag`). if cc.IsSharedDepTag(depTag) || cc.IsRuntimeDepTag(depTag) { if cc.IsSharedDepTag(depTag) || cc.IsRuntimeDepTag(depTag) || java.IsJniDepTag(depTag) { if cc, ok := child.(*cc.Module); ok { if android.InList(cc.Name(), providedNativeSharedLibs) { // If we're using a shared library which is provided from other APEX, Loading apex/apex_test.go +9 −0 Original line number Diff line number Diff line Loading @@ -2513,6 +2513,7 @@ func TestApexWithApps(t *testing.T) { srcs: ["foo/bar/MyClass.java"], sdk_version: "none", system_modules: "none", jni_libs: ["libjni"], } android_app { Loading @@ -2522,6 +2523,13 @@ func TestApexWithApps(t *testing.T) { system_modules: "none", privileged: true, } cc_library_shared { name: "libjni", srcs: ["mylib.cpp"], stl: "none", system_shared_libs: [], } `) module := ctx.ModuleForTests("myapex", "android_common_myapex_image") Loading @@ -2530,6 +2538,7 @@ func TestApexWithApps(t *testing.T) { ensureContains(t, copyCmds, "image.apex/app/AppFoo/AppFoo.apk") ensureContains(t, copyCmds, "image.apex/priv-app/AppFooPriv/AppFooPriv.apk") ensureContains(t, copyCmds, "image.apex/lib64/libjni.so") } func TestApexWithAppImports(t *testing.T) { Loading java/java.go +5 −0 Original line number Diff line number Diff line Loading @@ -430,6 +430,11 @@ type jniDependencyTag struct { target android.Target } func IsJniDepTag(depTag blueprint.DependencyTag) bool { _, ok := depTag.(*jniDependencyTag) return ok } var ( staticLibTag = dependencyTag{name: "staticlib"} libTag = dependencyTag{name: "javalib"} Loading Loading
apex/apex.go +1 −1 Original line number Diff line number Diff line Loading @@ -1216,7 +1216,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { if am, ok := child.(android.ApexModule); ok { // We cannot use a switch statement on `depTag` here as the checked // tags used below are private (e.g. `cc.sharedDepTag`). if cc.IsSharedDepTag(depTag) || cc.IsRuntimeDepTag(depTag) { if cc.IsSharedDepTag(depTag) || cc.IsRuntimeDepTag(depTag) || java.IsJniDepTag(depTag) { if cc, ok := child.(*cc.Module); ok { if android.InList(cc.Name(), providedNativeSharedLibs) { // If we're using a shared library which is provided from other APEX, Loading
apex/apex_test.go +9 −0 Original line number Diff line number Diff line Loading @@ -2513,6 +2513,7 @@ func TestApexWithApps(t *testing.T) { srcs: ["foo/bar/MyClass.java"], sdk_version: "none", system_modules: "none", jni_libs: ["libjni"], } android_app { Loading @@ -2522,6 +2523,13 @@ func TestApexWithApps(t *testing.T) { system_modules: "none", privileged: true, } cc_library_shared { name: "libjni", srcs: ["mylib.cpp"], stl: "none", system_shared_libs: [], } `) module := ctx.ModuleForTests("myapex", "android_common_myapex_image") Loading @@ -2530,6 +2538,7 @@ func TestApexWithApps(t *testing.T) { ensureContains(t, copyCmds, "image.apex/app/AppFoo/AppFoo.apk") ensureContains(t, copyCmds, "image.apex/priv-app/AppFooPriv/AppFooPriv.apk") ensureContains(t, copyCmds, "image.apex/lib64/libjni.so") } func TestApexWithAppImports(t *testing.T) { Loading
java/java.go +5 −0 Original line number Diff line number Diff line Loading @@ -430,6 +430,11 @@ type jniDependencyTag struct { target android.Target } func IsJniDepTag(depTag blueprint.DependencyTag) bool { _, ok := depTag.(*jniDependencyTag) return ok } var ( staticLibTag = dependencyTag{name: "staticlib"} libTag = dependencyTag{name: "javalib"} Loading