aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-registry/kotlin-debug-adapter/init.lua
blob: 2e7aa17cc472538e813b114651fd7003416d06f0 (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
26
27
28
29
30
local Pkg = require "mason-core.package"
local github = require "mason-core.managers.github"
local platform = require "mason-core.platform"
local path = require "mason-core.path"

return Pkg.new {
    name = "kotlin-debug-adapter",
    desc = [[Kotlin/JVM debugging for any editor/IDE using the Debug Adapter Protocol]],
    homepage = "https://github.com/fwcd/kotlin-debug-adapter",
    languages = { Pkg.Lang.Kotlin },
    categories = { Pkg.Cat.DAP },
    ---@async
    ---@param ctx InstallContext
    install = function(ctx)
        github
            .unzip_release_file({
                repo = "fwcd/kotlin-debug-adapter",
                asset_file = "adapter.zip",
            })
            .with_receipt()
        ctx:link_bin(
            "kotlin-debug-adapter",
            path.concat {
                "adapter",
                "bin",
                platform.is.win and "kotlin-debug-adapter.bat" or "kotlin-debug-adapter",
            }
        )
    end,
}