Ensures jar target builds a clean jar

Also, fixes testNG under gradle 11