aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/index/java-debug-adapter/init.lua
blob: 923804bef0a3267d6f4620a8d1ec04b4a435fd9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
local Pkg = require "mason-core.package"
local github = require "mason-core.managers.github"
local _ = require "mason-core.functional"
local path = require "mason-core.path"

return Pkg.new {
    name = "java-debug-adapter",
    desc = [[The debug server implementation for Java. It conforms to the debugger adapter protocol.]],
    homepage = "https://github.com/microsoft/java-debug",
    languages = { Pkg.Lang.Java },
    categories = { Pkg.Cat.DAP },
    ---@async
    ---@param ctx InstallContext
    install = function(ctx)
        github
            .unzip_release_file({
                repo = "microsoft/vscode-java-debug",
                asset_file = _.format "vscjava.vscode-java-debug-%s.vsix",
            })
            .with_receipt()

        ctx.fs:rmrf(path.concat { "extension", "images" })
        ctx.fs:rmrf(path.concat { "extension", "dist" })
    end,
}