diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..e9919cdf --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: android +install: npm install +script: + - npm test + - npm run test-build \ No newline at end of file diff --git a/bin/templates/project/build.gradle b/bin/templates/project/build.gradle index b6994b64..6de8c547 100644 --- a/bin/templates/project/build.gradle +++ b/bin/templates/project/build.gradle @@ -140,7 +140,7 @@ def promptForPassword(msg) { } } -task promptForReleaseKeyPassword { +def promptForReleaseKeyPassword() { if (!System.env.RELEASE_SIGNING_PROPERTIES_FILE) { return; } @@ -153,9 +153,11 @@ task promptForReleaseKeyPassword { } } -tasks.whenTaskAdded { task -> - if (task.name == 'validateReleaseSigning') { - task.dependsOn promptForReleaseKeyPassword +gradle.taskGraph.whenReady { taskGraph -> + taskGraph.getAllTasks().each() { task -> + if (task.name == 'validateReleaseSigning') { + promptForReleaseKeyPassword() + } } } diff --git a/package.json b/package.json index 7f1b8d97..976b687d 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "apache" ], "scripts": { - "test": "jasmine-node --color spec" + "test": "jasmine-node --color spec", + "test-build": "rm -rf \"test create\"; ./bin/create \"test create\" com.test.app Test && \"./test create/cordova/build\" && rm -rf \"test create\"" }, "author": "Apache Software Foundation", "license": "Apache version 2.0",