Merge "androidmk suport for aidl includes using LOCAL_PATH"
This commit is contained in:
commit
58aebd40d4
|
@ -27,6 +27,7 @@ type variableAssignmentContext struct {
|
|||
|
||||
var rewriteProperties = map[string](func(variableAssignmentContext) error){
|
||||
// custom functions
|
||||
"LOCAL_AIDL_INCLUDES": localAidlIncludes,
|
||||
"LOCAL_C_INCLUDES": localIncludeDirs,
|
||||
"LOCAL_EXPORT_C_INCLUDE_DIRS": exportIncludeDirs,
|
||||
"LOCAL_LDFLAGS": ldflags,
|
||||
|
@ -111,7 +112,6 @@ func init() {
|
|||
"LOCAL_DX_FLAGS": "dxflags",
|
||||
"LOCAL_JAVA_LIBRARIES": "libs",
|
||||
"LOCAL_STATIC_JAVA_LIBRARIES": "static_libs",
|
||||
"LOCAL_AIDL_INCLUDES": "aidl.include_dirs",
|
||||
"LOCAL_AAPT_FLAGS": "aaptflags",
|
||||
"LOCAL_PACKAGE_SPLITS": "package_splits",
|
||||
"LOCAL_COMPATIBILITY_SUITE": "test_suites",
|
||||
|
@ -308,6 +308,10 @@ func exportIncludeDirs(ctx variableAssignmentContext) error {
|
|||
return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "export_include_dirs", "local": "export_include_dirs"})
|
||||
}
|
||||
|
||||
func localAidlIncludes(ctx variableAssignmentContext) error {
|
||||
return splitAndAssign(ctx, classifyLocalOrGlobalPath, map[string]string{"global": "aidl.include_dirs", "local": "aidl.local_include_dirs"})
|
||||
}
|
||||
|
||||
func stem(ctx variableAssignmentContext) error {
|
||||
val, err := makeVariableToBlueprint(ctx.file, ctx.mkvalue, bpparser.StringType)
|
||||
if err != nil {
|
||||
|
|
|
@ -405,6 +405,24 @@ include $(BUILD_SHARED_LIBRARY)`,
|
|||
cc_library_shared {
|
||||
name: "iAmAModule",
|
||||
|
||||
}`,
|
||||
},
|
||||
{
|
||||
|
||||
desc: "LOCAL_AIDL_INCLUDES",
|
||||
in: `
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := iAmAModule
|
||||
LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/src/main/java system/core
|
||||
include $(BUILD_SHARED_LIBRARY)`,
|
||||
|
||||
expected: `
|
||||
cc_library_shared {
|
||||
name: "iAmAModule",
|
||||
aidl: {
|
||||
include_dirs: ["system/core"],
|
||||
local_include_dirs: ["src/main/java"],
|
||||
}
|
||||
}`,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue