Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 23 additions & 22 deletions lua/neotest-java/build_tool/build_tool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,32 @@
---@param deps neotest-java.BuildToolDeps
---@return neotest-java.BuildTool
local function create_build_tool(config, deps)
---@type neotest-java.BuildTool
return {
get_build_dirname = function(base_dir)
return config.get_build_dirname(base_dir, deps)
end,
---@type neotest-java.BuildTool
return {
get_build_dirname = function(base_dir)
return config.get_build_dirname(base_dir, deps)
end,

get_project_filename = function()
return config.project_filename
end,
get_project_filename = function()
return config.project_filename
end,

get_artifact_id = function(base_dir)
return config.get_artifact_id(base_dir, deps)
end,
get_artifact_id = function(base_dir)
return config.get_artifact_id(base_dir, deps)
end,

get_spring_property_filepaths = function(roots)
local base_dirs = vim.iter(roots)
:map(function(root)
return root:append(config.get_build_dirname(root, deps))
end)
:map(config.get_spring_subdirs)
:flatten()
:totable()
return deps.generate_spring_property_filepaths(base_dirs)
end,
}
get_spring_property_filepaths = function(roots)
local base_dirs = vim
.iter(roots)
:map(function(root)
return root:append(config.get_build_dirname(root, deps):to_string())
end)
:map(config.get_spring_subdirs)
:flatten()
:totable()
return deps.generate_spring_property_filepaths(base_dirs)
end,
}
end

return create_build_tool
Loading