diff options
| author | ruki <[email protected]> | 2024-04-23 23:21:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-23 23:21:04 +0800 |
| commit | d00c884b8d6b71f8f232cbb5cd0e7186ad966df9 (patch) | |
| tree | c84e743269b10c9a2d666b973899fa2d58f7d7fb /xmake/plugins | |
| parent | 9f2d6865e1d85fbf5a4cf3f6bae1648be32cd5e3 (diff) | |
add project apis
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/show/lists/apis.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/xmake/plugins/show/lists/apis.lua b/xmake/plugins/show/lists/apis.lua index 696b7133c..cfd243c63 100644 --- a/xmake/plugins/show/lists/apis.lua +++ b/xmake/plugins/show/lists/apis.lua @@ -22,11 +22,26 @@ import("core.project.config") import("core.project.rule") import("core.project.target") +import("core.project.project") import("core.project.option") import("core.package.package") import("core.tool.toolchain") import(".showlist") +-- get project scope apis +function project_scope_apis() + local result = {} + for _, names in pairs(project.apis()) do + for _, name in ipairs(names) do + if type(name) == "table" then + name = name[1] + end + table.insert(result, name) + end + end + return result +end + -- get target scope apis function target_scope_apis() local result = {} @@ -149,6 +164,7 @@ end -- get scope apis function scope_apis() local result = {} + table.join2(result, project_scope_apis()) table.join2(result, target_scope_apis()) table.join2(result, option_scope_apis()) table.join2(result, rule_scope_apis()) |
