Equivalents for mvn update and mvn install in gradle

Gradle will automatically fetch all required dependencies for you.

Long story short:

mvn update        ~= ./gradlew build --refresh-dependencies
mvn clean install ~= ./gradlew clean build

TL;DR

To force Gradle to redownload dependencies you can execute (How can I force gradle to redownload dependencies?):

./gradlew build --refresh-dependencies

To assemble you project without executing tests (Gradle build without tests):

./gradlew assemble

To completely build you project with test execution:

./gradlew build

You can skip certain tasks by providing -x argument:

./gradlew build -x test

Leave a Comment