Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c170e39a authored by Trevor Radcliffe's avatar Trevor Radcliffe Committed by Gerrit Code Review
Browse files

Merge "Add support for USES_LIBRARIES to androidmk"

parents 8cdd6f00 31b48a72
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -15,11 +15,12 @@
package androidmk

import (
	mkparser "android/soong/androidmk/parser"
	"fmt"
	"sort"
	"strings"

	mkparser "android/soong/androidmk/parser"

	bpparser "github.com/google/blueprint/parser"
)

@@ -128,6 +129,8 @@ func init() {
			"LOCAL_STATIC_LIBRARIES":              "static_libs",
			"LOCAL_WHOLE_STATIC_LIBRARIES":        "whole_static_libs",
			"LOCAL_SYSTEM_SHARED_LIBRARIES":       "system_shared_libs",
			"LOCAL_USES_LIBRARIES":                "uses_libs",
			"LOCAL_OPTIONAL_USES_LIBRARIES":       "optional_uses_libs",
			"LOCAL_ASFLAGS":                       "asflags",
			"LOCAL_CLANG_ASFLAGS":                 "clang_asflags",
			"LOCAL_COMPATIBILITY_SUPPORT_FILES":   "data",
+38 −0
Original line number Diff line number Diff line
@@ -1477,6 +1477,44 @@ android_test {
    name: "foo",
    lineage: "lineage",
}
`,
	},
	{
		desc: "LOCAL_USES_LIBRARIES",
		in: `
include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_USES_LIBRARIES := foo.test bar.test baz.test
include $(BUILD_PACKAGE)
`,
		expected: `
android_app {
    name: "foo",
    uses_libs: [
        "foo.test",
        "bar.test",
        "baz.test",
    ],
}
`,
	},
	{
		desc: "LOCAL_OPTIONAL_USES_LIBRARIES",
		in: `
include $(CLEAR_VARS)
LOCAL_MODULE := foo
LOCAL_OPTIONAL_USES_LIBRARIES := foo.test bar.test baz.test
include $(BUILD_PACKAGE)
`,
		expected: `
android_app {
    name: "foo",
    optional_uses_libs: [
        "foo.test",
        "bar.test",
        "baz.test",
    ],
}
`,
	},
}