Thanks a lot Dan for your reply.  Here is my question to Google, why you 
break the backward compatibility like that. Would it be much better to let 
the "Android.bp" recognize the library or entity exported from Android.mk. 
There are hundreds of Android,mk files still exist in AOSP source tree in 
Android 10.

On Friday, September 20, 2019 at 3:42:30 PM UTC-4, Dan Willemsen wrote:
>
> All dependencies of an Android.bp file must be in Android.bp, not 
> Android.mk. So you'll need to convert your libmine description to an 
> Android.bp file.
>
> - Dan
>
> On Wed, Sep 18, 2019 at 1:51 PM Jack Rong <jron...@gmail.com <javascript:>> 
> wrote:
>
>> 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 android-...@googlegroups.com 
>> <javascript:>
>> To unsubscribe from this group, send email to
>> android-...@googlegroups.com <javascript:>
>> 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 android-...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-building/7b078f33-17a4-47c4-b202-7a29d08f0253%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/android-building/7b078f33-17a4-47c4-b202-7a29d08f0253%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/69cac53a-f873-43ea-bb2c-15c73526a5b3%40googlegroups.com.

Reply via email to