Don't hardcode source and target compatibility version in JavaCompile test

+review REVIEW-5158