Add LOCAL_GENERATED_SOURCES to androidmk

Added the LOCAL_GENERATED_SOURCES support to the androidmk tool.

Bug: 216527541
Test: TreeHugger
Change-Id: I05b7aa4be6b50e405ec8ec15765d375a4626cc48
This commit is contained in:
Yuntao Xu
2022-01-31 11:03:39 -08:00
parent dedd43c7b9
commit 680478266b
2 changed files with 26 additions and 0 deletions

View File

@@ -191,6 +191,7 @@ func init() {
// will be removed later by byfix
// TODO: does this property matter in the license module?
"LOCAL_LICENSE_CONDITIONS": "android_license_conditions",
"LOCAL_GENERATED_SOURCES": "generated_sources",
})
addStandardProperties(bpparser.BoolType,

View File

@@ -1618,6 +1618,31 @@ android_app {
name: "foo",
}
`,
},
{
desc: "LOCAL_GENERATED_SOURCES",
in: `
include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_SRC_FILES := src1, src2, src3
LOCAL_GENERATED_SOURCES := gen_src1, gen_src2, gen_src3
include $(BUILD_PACKAGE)
`,
expected: `
android_app {
name: "foo",
srcs: [
"src1,",
"src2,",
"src3",
],
generated_sources: [
"gen_src1,",
"gen_src2,",
"gen_src3",
],
}
`,
},
}