require user to type 'espresso' at the warning prompt

// FREEBIE
This commit is contained in:
Rhodey Orbits 2015-05-29 11:01:44 -07:00 committed by Moxie Marlinspike
parent d6a970133e
commit a0246836a8

View File

@ -245,11 +245,12 @@ if (propFile.canRead()){
}
if (project.hasProperty('espresso') && System.console() != null) {
println '____________________WARNING_____________________'
println 'ALL YOUR CONTACTS WILL BE DELETED IN THE PROCESS'
println 'OF RUNNING THESE TESTS, TYPE ENTER TO CONTINUE'
System.console().readLine(':')
println "____________________WARNING_____________________"
println "ALL YOUR CONTACTS WILL BE DELETED IN THE PROCESS"
println "OF RUNNING THESE TESTS, TYPE 'espresso' TO CONTINUE"
def input = System.console().readLine(':')
if (input == 'espresso') {
android.productFlavors {
base {}
espresso {
@ -263,4 +264,5 @@ if (project.hasProperty('espresso') && System.console() != null) {
java.srcDirs = ['test/androidTestEspresso/java']
res.srcDirs = ['test/androidTestEspresso/res']
}
}
}