Using reflection to access gradle internal API.