Move scala-doc generation earlier in the build lifecycle