Found an easy way to make sure that produced artifacts are using the right java version.
I think verifying it like this will be more reliable
We need to use the actual clock, and not clock wrapper here....otherwise we could get into a point where the clock is not advancing when it should be.
Another fix for this optimization
This should fix the deadlock for good.  We don't allow spinning while we hold the lock.  And we also set an absolute time limit, instead of letting the delay update
Added emma code coverage based off this:
https://raw.github.com/breskeby/gradleplugins/master/emmaPlugin/emma.gradle