I have a scenario that is to link in a Java static library built from an 
Android.mk file to complete the whole AOSP image build in Android P. The 
build system somehow is not versatile enough to discover the static library 
built from other project using the Android.mk. Here is an example:

 1) Android.mk file at the "package/app/MyLibs"

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libmine

LOCAL_SRC_FILES := \
$(call all-java-files-under, src/main/java) \
$(call all-Iaidl-files-under, src/main/aidl)

ifneq ($(filter 28,$(PLATFORM_SDK_VERSION)),)
LOCAL_PRIVATE_PLATFORM_APIS := true
else
LOCAL_SDK_VERSION := current
endif

LOCAL_STATIC_JAVA_LIBRARIES := libgson

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_STATIC_JAVA_LIBRARY)


2) Android.bp at "frameworks/base/services/devicepolicy"

java_library_static {
    name: "services.devicepolicy",
    srcs: ["java/**/*.java"],

    libs: [
        "conscrypt",
        "services.core",
    ],
    static_libs: [
        "libmine",
    ],
}

3) Build message:

error: frameworks/base/services/devicepolicy/Android.bp:1:1: 
"services.devicepolicy" depends on undefined module "libmine"


-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/7b078f33-17a4-47c4-b202-7a29d08f0253%40googlegroups.com.

Reply via email to