Support LOCAL_ENFORCE_USES_LIBRARIES in androidmk
1. add LOCAL_ENFORCE_USES_LIBRARIES support in the androidmk tool; 2. add one test case. Bug: 187838385 Test: run 'm androidmk' Test: TreeHugger Change-Id: Ibdde2a5a58ef45655a3083b592fa21f7fe63d032
This commit is contained in:
parent
d8561166eb
commit
c97761e781
|
@ -216,6 +216,8 @@ func init() {
|
||||||
"LOCAL_JETIFIER_ENABLED": "jetifier",
|
"LOCAL_JETIFIER_ENABLED": "jetifier",
|
||||||
|
|
||||||
"LOCAL_IS_UNIT_TEST": "unit_test",
|
"LOCAL_IS_UNIT_TEST": "unit_test",
|
||||||
|
|
||||||
|
"LOCAL_ENFORCE_USES_LIBRARIES": "enforce_uses_libs",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1444,6 +1444,23 @@ runtime_resource_overlay {
|
||||||
theme: "FooTheme",
|
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,
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue