2016-10-28 15:49:00 +00:00
|
|
|
|
2016-03-08 04:04:33 +00:00
|
|
|
node {
|
2016-06-21 11:40:26 +00:00
|
|
|
def flavorCombination='WithMapsWithAnalyticsForPlay'
|
|
|
|
|
|
|
|
stage 'checkout'
|
2016-07-19 04:49:42 +00:00
|
|
|
checkout scm
|
2016-06-21 11:40:26 +00:00
|
|
|
|
|
|
|
stage 'UITest'
|
2016-07-19 04:49:42 +00:00
|
|
|
lock('adb') {
|
2016-06-23 08:10:01 +00:00
|
|
|
try {
|
2016-07-19 04:49:42 +00:00
|
|
|
sh "./gradlew clean spoon${flavorCombination}"
|
2016-06-23 08:10:01 +00:00
|
|
|
} catch(err) {
|
|
|
|
currentBuild.result = FAILURE
|
|
|
|
} finally {
|
2016-10-28 15:49:00 +00:00
|
|
|
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: "android/build/spoon", reportFiles: '*/debug/index.html', reportName: 'Spoon'])
|
|
|
|
step([$class: 'JUnitResultArchiver', testResults: 'android/build/spoon/*/debug/junit-reports/*.xml'])
|
2016-06-23 08:10:01 +00:00
|
|
|
}
|
2016-03-01 07:35:08 +00:00
|
|
|
}
|
2016-06-23 08:10:01 +00:00
|
|
|
|
2016-07-19 04:49:42 +00:00
|
|
|
stage 'lint'
|
|
|
|
try {
|
2016-09-28 14:59:12 +00:00
|
|
|
sh "./gradlew lint${flavorCombination}Release"
|
2016-07-19 04:49:42 +00:00
|
|
|
} catch(err) {
|
|
|
|
currentBuild.result = FAILURE
|
|
|
|
} finally {
|
|
|
|
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'android/build/outputs/', reportFiles: "lint-results-*Release.html", reportName: 'Lint'])
|
2016-09-10 14:30:42 +00:00
|
|
|
androidLint canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
|
|
|
}
|
2016-07-19 05:28:34 +00:00
|
|
|
|
2016-07-19 04:49:42 +00:00
|
|
|
stage 'test'
|
2016-09-10 12:47:03 +00:00
|
|
|
try {
|
2016-09-28 14:59:12 +00:00
|
|
|
sh "./gradlew test${flavorCombination}DebugUnitTest"
|
2016-09-10 12:47:03 +00:00
|
|
|
} catch(err) {
|
|
|
|
currentBuild.result = FAILURE
|
|
|
|
} finally {
|
2016-09-28 13:24:08 +00:00
|
|
|
step([$class: 'JUnitResultArchiver', testResults: 'android/build/test-results/*/*/*.xml'])
|
|
|
|
publishHTML(target:[allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'android/build/reports/tests/', reportFiles: "*/*/index.html", reportName: 'UnitTest'])
|
2016-09-10 12:47:03 +00:00
|
|
|
}
|
|
|
|
|
2016-08-08 14:07:23 +00:00
|
|
|
stage 'assemble'
|
2016-09-28 14:59:12 +00:00
|
|
|
sh "./gradlew assemble${flavorCombination}Release"
|
2016-08-08 14:07:23 +00:00
|
|
|
archive 'android/build/outputs/apk/*'
|
|
|
|
archive 'android/build/outputs/mapping/*/release/mapping.txt'
|
|
|
|
|
2016-03-08 04:04:33 +00:00
|
|
|
}
|