Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to find out new version is available for external libraries used in Android Studio project

I am new to Android development. so the external libraries (aka. dependencies) are defined in build.gradle like

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v13:21.0.0'
    compile 'com.squareup.dagger:dagger:1.2.1'
    compile 'com.google.code.gson:gson:2.1'
    compile 'de.greenrobot:eventbus:2.4.0'
}

Is there an easy way to find out if any of these libraries has got a newer version for update? I noticed that Android Studio reminds new version available for gson but not for other libraries.

I'm from the iOS background, CocoaPods is the tool we use to manage external libraries. Using pod outdated command, it is very easy to figure out which libs have new version for upgrade.

like image 823
Chris Chen Avatar asked May 07 '15 23:05

Chris Chen


1 Answers

There is a lint option called "Newer Library Versions Available".

You may need to add this to your build.gradle as well:

android {
    ...

    lintOptions { warning 'NewerVersionAvailable' }
}

Then you can run Analyze > Run Inspection By Name... > Newer Library Versions Available to get a list of outdated dependencies.

like image 132
tachyonflux Avatar answered Sep 19 '22 15:09

tachyonflux