Why not combine this and the next android commands in 1 line? That makes travis-ci output a bit more readable (less folded-output lines) and it appears that these commands should all be run, or none of them should be run.
I agree that it makes the whole file a bit less readable, but personally I feel that all these if-statements are not very nice to look at either.