Add silly hacks to make Gradle behave.

Add fake jar/test tasks with dependencies on the subprojects.
Make dependencies depend on subprojects.