diff --git a/androidmk/androidmk/android.go b/androidmk/androidmk/android.go index f0f51bf6f..5316d7b32 100644 --- a/androidmk/androidmk/android.go +++ b/androidmk/androidmk/android.go @@ -216,6 +216,8 @@ func init() { "LOCAL_JETIFIER_ENABLED": "jetifier", "LOCAL_IS_UNIT_TEST": "unit_test", + + "LOCAL_ENFORCE_USES_LIBRARIES": "enforce_uses_libs", }) } diff --git a/androidmk/androidmk/androidmk_test.go b/androidmk/androidmk/androidmk_test.go index f32ff2acb..439f45d0a 100644 --- a/androidmk/androidmk/androidmk_test.go +++ b/androidmk/androidmk/androidmk_test.go @@ -1444,6 +1444,23 @@ runtime_resource_overlay { theme: "FooTheme", } +`, + }, + { + desc: "LOCAL_ENFORCE_USES_LIBRARIES", + in: ` +include $(CLEAR_VARS) +LOCAL_MODULE := foo +LOCAL_ENFORCE_USES_LIBRARIES := false +LOCAL_ENFORCE_USES_LIBRARIES := true +include $(BUILD_PACKAGE) +`, + expected: ` +android_app { + name: "foo", + enforce_uses_libs: false, + enforce_uses_libs: true, +} `, }, }