How to update Gradle dependencies to their latest version

前端 未结 4 952
有刺的猬
有刺的猬 2020-12-24 06:02

Is there an easy way to get gradle to update dependencies to their latest available version?

For build reproducibility all my dependencies are defined with a version

4条回答
  •  渐次进展
    2020-12-24 06:33

    I suffer from it, too. And the best way to check dependencies, even manually, is to go through Project Structure and search for the dependency name and see if there is a newer version.

    The problem that this query only checks for the dependencies present in the Maven repository. At least it already goes for Google's.

    Note: If you choose to add the dependency with the new version, this will add a duplicity in the your App Gradle, so be sure to delete the old dependency row.

    #

    Another possible quick fix is through the command line:

    ./gradlew app: dependencies
    

    This will generate an output like the one below. Note that the asterisk points to a possible new existing version.

提交回复
热议问题