const path = require('path'); module.exports = { tags: async (tln) => [], dotenvs: async (tln) => [], options: async (tln, args) => { }, env: async (tln, env) => { env.BUNDLETOOL_HOME = env.TLN_COMPONENT_HOME; env.PATH = [ env.BUNDLETOOL_HOME, env.PATH ].join(path.delimiter); }, 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 desc = { name: `bundletool-all-${version}.jar`, opts: null, url: `https://github.com/google/bundletool/releases/download/${version}/bundletool-all-${version}.jar`, cmd: `mv ./bundletool-all-${version}.jar ./bundletool.jar && echo '#/bin/bash' > bundletool && echo 'java -jar ${path.join(home, "bundletool.jar")} $@' >> bundletool && chmod +x ./bundletool`, keep: true } const desc2 = { name: `bundletool-all-${version}.jar`, opts: null, url: `https://github.com/google/bundletool/releases/download/${version}/bundletool-all-${version}.jar`, cmd: `ren bundletool-all-${version}.jar bundletool.jar && echo java -jar ${path.join(home, "bundletool.jar")} %%* >> bundletool.cmd`, keep: true } script.set(tln.getDownloadScript(tln, { linux: desc, darwin: desc, win32: desc2 })); } } }, ], components: async (tln) => require('./components.js') }