I am an Android Firmware developer, working with a source of Android 12. I wanted to convert my Android.mk file to Android.bp, with the same definitions in tact in order to build a static jar library.
Android.mk file:
LOCAL_PATH := $(call my-dir)
# the library
# ============================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src/com/example/foo/player)
# This is the target being built.
LOCAL_MODULE := com.example.foo.player
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_MODULE_TAGS := optional
LOCAL_JACK_ENABLED := disabled
#If Android P, set LOCAL_PRIVATE_PLATFORM_APIS true.
#LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_STATIC_JAVA_LIBRARY)
Any help is very much appreciated. Thanks in advance.
I have translated the definitions from Android.mk to Android.bp.
It looks like this:
Let me know if any corrections or improvisations is necessary.