Estimote / Android-Fleet-Management-SDK

Estimote Fleet Management SDK for Android
https://developer.estimote.com
MIT License
836 stars 451 forks source link

SDK dependencies went out of control #251

Closed alexvasilkov closed 7 years ago

alexvasilkov commented 7 years ago

Once I added Estimote SDK to my project I instantly ran out of 64k methods limit.

I added SDK as in readme:

dependencies {
  compile 'com.estimote:sdk:1.1.0'
}

And SDK brought 33082 methods with it, as you can see here.

SDK dependencies list looks pretty crazy, e.g. it depends on RxJava, Dagger and Kotlin std lib:

+--- com.estimote:sdk:1.1.0
|    +--- com.estimote:coresdk:1.1.0
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3
|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.1.2-3
|    |              \--- org.jetbrains:annotations:13.0
|    \--- com.estimote:mgmtsdk:1.1.0
|         +--- org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3 (*)
|         +--- com.estimote:coresdk:1.1.0 (*)
|         +--- com.estimote:management-sdk:0.0.3
|         |    +--- org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3 (*)
|         |    +--- io.reactivex.rxjava2:rxandroid:2.0.1 (*)
|         |    +--- io.reactivex.rxjava2:rxjava:2.1.0 (*)
|         |    +--- com.google.dagger:dagger:2.9 -> 2.10 (*)
|         |    +--- com.estimote:coresdk:1.0.10 -> 1.1.0 (*)
|         |    \--- com.estimote:internal-plugins-api:0.0.2
|         |         +--- org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3 (*)
|         |         +--- io.reactivex.rxjava2:rxandroid:2.0.1 (*)
|         |         +--- io.reactivex.rxjava2:rxjava:2.1.0 (*)
|         |         \--- com.estimote:coresdk:1.0.10 -> 1.1.0 (*)
|         \--- com.estimote:cloud-plugin:0.0.3
|              +--- org.jetbrains.kotlin:kotlin-stdlib:1.1.2-3 (*)
|              +--- io.reactivex.rxjava2:rxandroid:2.0.1 (*)
|              +--- io.reactivex.rxjava2:rxjava:2.1.0 (*)
|              +--- com.squareup.retrofit2:retrofit:2.2.0 -> 2.3.0 (*)
|              +--- com.squareup.retrofit2:converter-gson:2.2.0 -> 2.3.0 (*)
|              +--- com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0
|              |    +--- com.squareup.retrofit2:retrofit:2.1.0 -> 2.3.0 (*)
|              |    \--- io.reactivex.rxjava2:rxjava:2.0.0 -> 2.1.0 (*)
|              +--- com.squareup.okhttp3:logging-interceptor:3.8.0 (*)
|              +--- com.google.dagger:dagger:2.9 -> 2.10 (*)
|              \--- com.estimote:internal-plugins-api:0.0.2 (*)

Also I see that some of the dependencies are repackaged and hardcoded into coresdk and mgmtsdk: Gson 2.3.1, OkHttp 2.2.0, Retrofit 1.9.0, etc.

I only want to be able to listen for beacons around, is there any option to use Estimote SDK without bringing all of these dependencies which forces me to enable multidex (which I definitely don't want to do)?

wafel82 commented 7 years ago

Hi, It's true that our SDK is pretty big and that it depends on many things. This is because - under the hood - this SDK performs a loot operations and algorithms to make end user experience smoother and easier.

We are currently in the middle of huge architectural re-design which will make our SDK more modular and allow users to peek smaller packages directly addressing their needs (This is why you are seeing "strange" stuff our SDK depends on like Kotlin, RxJava or Dagger)

I think our re-organised SDK will fit your needs and allow you to use our libraries without multi-dex enabled - so stay tuned :) As for now - one thing I can suggest is to use proguard in your project.

Regards Wojtek

alexvasilkov commented 7 years ago

Hi Wojtek, thanks for clarification, looking forward to see a more lightweight SDK. Meanwhile I have to switch to AltBeacons library which has 25 times less methods :)