Why doesn't mopub gradle dependencies update automatically?

android
gradle

#1

There are two ways to update dependency in gradle:

  1. Manually set the dependency version (ex: compile 'com.google.code.gson:gson:2.8.1')
  2. Define dependency as “changing” and let gradle do the work automatically (ex: compile('com.google.code.gson:gson:2.8.1') { changing = true })

My question is, why doesn’t mopub and similar advertising SDKs update automatically (aka use the changing feature)?


#2

Hello,

You can always use the “+” notation like below to get the latest version of our Android SDK each time Gradle syncs. It’ll get the 4.19.0 version at the time of writing.

compile('com.mopub:mopub-sdk:4.+@aar') {
    transitive = true
}

The reason we do not do that by default is to give the control over to publishers on which version of our SDK they’d like to use. It’s also a best practice, since arbitrarily using the latest version of libraries might affect the performance of your app without you testing them first.