const path = require('path'); module.exports = { tags: async (tln) => [], options: async (tln) => [], env: async (tln, env) => { env.KOTLIN_HOME = env.TLN_COMPONENT_HOME; env.PATH = [path.join(env.TLN_COMPONENT_HOME, 'bin'), env.PATH].join(path.delimiter); }, dotenvs: async (tln) => [], inherits: async (tln) => [], depends: async (tln) => [], steps: async (tln) => [ { id: 'install', filter: '', builder: async (tln, script) => { const id = script.env.TLN_COMPONENT_ID; const home = script.env.TLN_COMPONENT_HOME; const {name, version} = tln.unpackId(id); if (version && tln.canInstallComponent(tln, id, home)) { const param = { name: `kotlin-compiler-${version}.zip`, opts: { src: `kotlinc`, flt: `*`, dest: `.`, rmv: `kotlinc` }, url: `https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip` }; script.set(tln.getDownloadScript(tln, { linux: param, darwin: param, win32: param })); } } } ], components: async (tln) => require('./components.js') }