JAR file getting huge? Find out which dependencies are the largest first:
Finding Gradle dependency sizes
Then you can refactor to remove the worst offenders.
But what can you do if one of those large dependencies isn't a direct dependencies? Use the Gradle dependencies task to find out which library depends on it.
Run ./gradlew dependencies
Example output: