Added assets and assets_dir.
This commit is contained in:
parent
3b6d3c4058
commit
22bb8c204d
|
@ -26,12 +26,16 @@ Finally, import the AAR into Android Studio.
|
||||||
|
|
||||||
load("@build_bazel_rules_android//android:rules.bzl", "android_binary", "android_library")
|
load("@build_bazel_rules_android//android:rules.bzl", "android_binary", "android_library")
|
||||||
|
|
||||||
def mediapipe_aar(name, calculators = []):
|
def mediapipe_aar(name, calculators = [], assets = [], assets_dir = ""):
|
||||||
"""Generate MediaPipe AAR.
|
"""Generate MediaPipe AAR.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
name: the name of the AAR.
|
name: the name of the AAR.
|
||||||
calculators: the calculator libraries to be compiled into the .so.
|
calculators: the calculator libraries to be compiled into the .so.
|
||||||
|
assets: additional assets to be included into the archive.
|
||||||
|
assets_dir: path where the assets will the packaged. See
|
||||||
|
https://docs.bazel.build/versions/master/be/android.html#android_library
|
||||||
|
for more information.
|
||||||
"""
|
"""
|
||||||
native.cc_binary(
|
native.cc_binary(
|
||||||
name = "libmediapipe_jni.so",
|
name = "libmediapipe_jni.so",
|
||||||
|
@ -106,6 +110,8 @@ cat > $(OUTS) <<EOF
|
||||||
"@com_google_guava_android//jar",
|
"@com_google_guava_android//jar",
|
||||||
"@androidx_lifecycle//jar",
|
"@androidx_lifecycle//jar",
|
||||||
],
|
],
|
||||||
|
assets = assets,
|
||||||
|
assets_dir = assets_dir,
|
||||||
)
|
)
|
||||||
|
|
||||||
_aar_with_jni(name, name + "_android_lib")
|
_aar_with_jni(name, name + "_android_lib")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user