Skip to content

Instantly share code, notes, and snippets.

@jpignata
Created May 27, 2020 13:34
Show Gist options
  • Save jpignata/d2442e725e19ededc30a920ee304a5a7 to your computer and use it in GitHub Desktop.
Save jpignata/d2442e725e19ededc30a920ee304a5a7 to your computer and use it in GitHub Desktop.
project.task('createAmplifyApp') {
def npx = 'npx'
if (project.file(gradleConfigFileName).exists()) {
return
}
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
npx += '.cmd'
}
try {
project.exec {
commandLine npx, 'amplify-app', '--platform', 'android'
}
} catch (commandLineFailure) {
throw new Exception('Node.js is not installed. Visit https://nodejs.org/en/download/ to install it.')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment