It will randomly fail, so be extra careful. `yes` or echoing without the
sleep will also fail because the SDK sucks at reading a single line.
Also remove the ANDROID_HOME test since this now runs on the public
workers with their default image, which don't have the SDK preinstalled.
And ignore SDK install errors, since it likes to complain about not
being able to stop the ADB server. If anything doesn't install properly,
it will cause errors down the line and CI will fail anyway.
It doesn't include all of the Android style checks as found in Android Studio,
but it's a start.
Bump Gradle to 2.7 because the checkstyle plugin in earlier versions is just
not good enough.
Its boot animation is "stopped" but on my laptop the CPU is still at 100%,
which means it's probably still working and not ready yet. The tests fail if
you run them right after wait-for-emulator is done. If you wait a few seconds
though, they do work since the CPU load drops.
Until we can figure out a better solution, have a generous 30-second sleep
after it tells us it's ready.
This will make sure that all projects in the repository are built and tested.
Should come in handy for !126, which splits up the app into two apps and one
library.
Spotted by Hans at fdroidserver. The 'update sdk' tool will download the
package index at each run, so installing one package at a time will be rather
inefficient.