Skip to content

Commit

Permalink
Feature - Version Properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Chahine committed Mar 20, 2018
1 parent 6976a7b commit aeeb37c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ class BootstrapTask extends DefaultTask {
}

@TaskAction def bootstrap() {

def versionFile = new File("version.properties")
if (versionFile.exists()) versionFile.delete()
versionFile.withWriter { it.write("BUILD_NUMBER = 1\nVERSION = dev\n") }

def pandroidDropboxToken = System.getenv().get("PANDROID_DROPBOX_TOKEN")
if (pandroidDropboxToken == null) {
throw new GradleException(
"You need to export the PANDROID_DROPBOX_TOKEN to your system environment before running the bootstrap task.\n" +
"You can find the token in 1Password then on your terminal:\n" +
"Refer to the plugin README on how to generate your token:\n" +
"\$> export PANDROID_DROPBOX_TOKEN=<token>")
}

Expand Down

0 comments on commit aeeb37c

Please sign in to comment.