Refine dependencies. Add gradlew support.