Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Checking Dependency Updates

Checking Dependency Updates

On July/2019 Android Weekend, I have talked about how to check if there are updates available for your Android app dependencies such as the versions of gradle plugins, Kotlin, and libraries that the app depends on.

With gradle-versions-plugin, you can easily check if the updates are available with a single gradle command, so you can easily automate the version checks with CI as well.

The plugin also provides ways to customize the result of the version checks. If you have not tried it yet, I strongly recommend that you check it out :)

* github/gradle-versions-plugin
https://github.com/ben-manes/gradle-versions-plugin

* Android Weekend:
https://www.meetup.com/AndroidWeekend/events/262193141/

Shohei Kawano

June 30, 2019
Tweet

More Decks by Shohei Kawano

Other Decks in Technology

Transcript

  1. Typical Dependencies for Android •Kotlin •UI - RecyclerViews, ViewPager, etc.

    •Jetpack - Lifecycle, ViewModels, LiveData, etc. •OkHttp •Retrofit •Firebase
  2. - androidx.activity:activity-ktx:1.0.0-beta01 - androidx.appcompat:appcompat:1.1.0-beta01 - androidx.browser:browser:1.0.0 - androidx.cardview:cardview:1.0.0 - androidx.collection:collection-ktx:1.1.0

    - androidx.emoji:emoji:1.0.0 - androidx.fragment:fragment-ktx:1.1.0-beta01 - androidx.gridlayout:gridlayout:1.0.0 - androidx.recyclerview:recyclerview:1.0.0 - com.crashlytics.sdk.android:crashlytics:2.10.1 - com.facebook.android:facebook-login:5.1.0 - com.firebase:firebase-jobdispatcher:0.8.6 - com.github.chrisbanes:PhotoView:2.3.0 - com.google.android:flexbox:1.1.0 - com.google.android.gms:play-services-analytics:17.0.0 - com.google.android.gms:play-services-base:17.0.0 - com.google.android.gms:play-services-tagmanager:17.0.0 - com.google.android.material:material:1.0.0 - com.google.code.gson:gson:2.8.5 - com.google.firebase:firebase-config:18.0.0 - com.google.firebase:firebase-core:17.0.0 - com.google.firebase:firebase-dynamic-links:18.0.0 - com.google.firebase:firebase-messaging:19.0.1 - com.google.firebase:firebase-perf:18.0.1 - com.jakewharton.rxbinding2:rxbinding-kotlin:2.2.0 - com.jakewharton.threetenabp:threetenabp:1.2.1 - com.jakewharton.timber:timber:4.7.1 - com.readystatesoftware.chuck:library:1.1.0 - com.squareup.okhttp3:okhttp:3.14.2 - com.squareup.retrofit2:converter-gson - com.squareup.retrofit2:retrofit - com.xwray:groupie - io.reactivex.rxjava2:rxjava - io.reactivex.rxjava2:rxkotlin - org.robolectric:robolectric - com.squareup.okio:okio:2.2.2 - io.reactivex.rxjava2:rxandroid:2.1.1 - jp.co.cyberagent.android:gpuimage:2.0.3 - org.greenrobot:eventbus:3.1.1 - org.greenrobot:eventbus-annotation-processor:3.1.1 - org.jetbrains.kotlin:kotlin-android-extensions:1.3.40 - org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.40 - org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.3.40 - org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.40 - org.permissionsdispatcher:permissionsdispatcher:4.3.1 - org.permissionsdispatcher:permissionsdispatcher-processor:4.3.1 - androidx.constraintlayout:constraintlayout - androidx.core:core-ktx - androidx.databinding:databinding-adapters - androidx.databinding:databinding-common - androidx.databinding:databinding-compiler - androidx.databinding:databinding-runtime - androidx.lifecycle:lifecycle-compiler - androidx.lifecycle:lifecycle-extensions - androidx.lifecycle:lifecycle-viewmodel-ktx - androidx.transition:transition - com.airbnb.android:lottie - com.android.tools.lint:lint-gradle - com.f2prateek.rx.preferences2:rx-preferences - com.github.franmontiel:PersistentCookieJar - com.google.dagger:dagger - com.google.dagger:dagger-android - com.google.dagger:dagger-android-processor - com.google.dagger:dagger-android-support - com.google.dagger:dagger-compiler - com.otaliastudios:cameraview - com.squareup.okhttp3:okhttp-urlconnection - com.squareup.retrofit2:adapter-rxjava2
  3. root/build.gradle buildscript { repositories { jcenter() } dependencies { classpath

    "com.github.ben-manes:gradle-versions-plugin:$version" } } … app/build.gradle apply plugin: "com.github.ben-manes.versions" 4FUVQ
  4. ------------------------------------------------------------ :app Project Dependency Updates (report to plain text file)

    ------------------------------------------------------------ The following dependencies are using the latest milestone version: - androidx.activity:activity-ktx:1.0.0-beta01 - androidx.appcompat:appcompat:1.1.0-beta01 - androidx.browser:browser:1.0.0 - androidx.cardview:cardview:1.0.0 - androidx.collection:collection-ktx:1.1.0 - androidx.emoji:emoji:1.0.0 - androidx.fragment:fragment-ktx:1.1.0-beta01 - androidx.gridlayout:gridlayout:1.0.0 - androidx.recyclerview:recyclerview:1.0.0 - com.crashlytics.sdk.android:crashlytics:2.10.1 - com.facebook.android:facebook-login:5.1.0 - com.firebase:firebase-jobdispatcher:0.8.6 - com.github.chrisbanes:PhotoView:2.3.0 - com.google.android:flexbox:1.1.0 - com.google.android.gms:play-services-analytics:17.0.0 - com.google.android.gms:play-services-base:17.0.0 - com.google.android.gms:play-services-tagmanager:17.0.0 - com.google.android.material:material:1.0.0 - com.google.code.gson:gson:2.8.5 - com.google.firebase:firebase-config:18.0.0 - com.google.firebase:firebase-core:17.0.0 - com.google.firebase:firebase-dynamic-links:18.0.0 - com.google.firebase:firebase-messaging:19.0.1 - com.google.firebase:firebase-perf:18.0.1 - com.jakewharton.rxbinding2:rxbinding-kotlin:2.2.0 - com.jakewharton.threetenabp:threetenabp:1.2.1 - com.jakewharton.timber:timber:4.7.1 - com.readystatesoftware.chuck:library:1.1.0 - com.squareup.okhttp3:okhttp:3.14.2 - com.squareup.okio:okio:2.2.2 - io.reactivex.rxjava2:rxandroid:2.1.1 - jp.co.cyberagent.android:gpuimage:2.0.3 - org.greenrobot:eventbus:3.1.1 - org.greenrobot:eventbus-annotation-processor:3.1.1 - org.jetbrains.kotlin:kotlin-android-extensions:1.3.40 - org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.40 - org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.3.40
  5. The following dependencies have later milestone versions: - androidx.constraintlayout:constraintlayout [2.0.0-beta1

    -> 2.0.0-beta2] http://tools.android.com - androidx.core:core-ktx [1.1.0-rc01 -> 1.2.0-alpha02] https://developer.android.com/jetpack/androidx - androidx.databinding:databinding-adapters [3.4.1 -> 3.6.0-alpha04] - androidx.databinding:databinding-common [3.4.1 -> 3.6.0-alpha04] https://developer.android.com/studio - androidx.databinding:databinding-compiler [3.4.1 -> 3.6.0-alpha04] https://developer.android.com/studio - androidx.databinding:databinding-runtime [3.4.1 -> 3.6.0-alpha04] - androidx.lifecycle:lifecycle-compiler [2.0.0 -> 2.2.0-alpha01] https://developer.android.com/topic/libraries/architecture/index.html - androidx.lifecycle:lifecycle-extensions [2.0.0 -> 2.2.0-alpha01] https://developer.android.com/topic/libraries/architecture/index.html - androidx.lifecycle:lifecycle-viewmodel-ktx [2.0.0 -> 2.2.0-alpha01] http://developer.android.com/tools/extras/support-library.html - androidx.transition:transition [1.1.0-rc02 -> 1.2.0-alpha01] http://developer.android.com/tools/extras/support-library.html - com.airbnb.android:lottie [3.0.0 -> 3.0.7] https://github.com/airbnb/lottie-android - com.android.tools.build:aapt2 [3.4.1-5326820 -> 3.6.0-alpha04-5638319] https://developer.android.com/studio - com.android.tools.lint:lint-gradle [26.4.1 -> 26.6.0-alpha04] https://developer.android.com/studio - com.f2prateek.rx.preferences2:rx-preferences [2.0.0-RC1 -> 2.0.0] https://github.com/f2prateek/rx-preferences - com.github.franmontiel:PersistentCookieJar [v1.0.1 -> 1.0.1] https://github.com/franmontiel/PersistentCookieJar - com.google.dagger:dagger [2.23.1 -> 2.23.2] https://github.com/google/dagger - com.google.dagger:dagger-android [2.23.1 -> 2.23.2] https://github.com/google/dagger - com.google.dagger:dagger-android-processor [2.23.1 -> 2.23.2] https://github.com/google/dagger - com.google.dagger:dagger-android-support [2.23.1 -> 2.23.2] https://github.com/google/dagger - com.google.dagger:dagger-compiler [2.23.1 -> 2.23.2] https://github.com/google/dagger - com.otaliastudios:cameraview [1.6.0 -> 2.0.0-beta05] https://github.com/natario1/CameraView - com.squareup.okhttp3:okhttp-urlconnection [3.14.2 -> 4.0.0] https://github.com/square/okhttp - com.squareup.retrofit2:adapter-rxjava2 [2.5.0 -> 2.6.0] https://github.com/square/retrofit/ - com.squareup.retrofit2:converter-gson [2.5.0 -> 2.6.0] https://github.com/square/retrofit/