yayaa / LocationManager

Simplify getting user's location for Android
806 stars 187 forks source link

using provided to gms service to decrease method count #29

Closed xxxifan closed 7 years ago

xxxifan commented 7 years ago

for some user don't use gms like me, it's a huge cost to including gms dependency in apk. but is it possible to set it as provided ? besides it can solve version problem, everyone can use their targeting gms version and don't need to exclude it again.

xxxifan commented 7 years ago

I tried to exclude gms package but it will occur NoClassDefFoundError, if you can do a class exists condition then it would be nice

yayaa commented 7 years ago

I'll investigate about 'provided' but library depends highly on gms you cannot just exclude and don't provide your version. So if you need location, you depend on gms either with the library or without it.

xxxifan commented 7 years ago

I'm using

compile('com.yayandroid:LocationManager:1.1.5') {
        exclude group: 'com.google.android.gms'
    }

with doNotUseGooglePlayServices(true) Configuration

for who don't want to depend gms :p

yayaa commented 7 years ago

Ahhh, that's what you mean :D Sorry couldn't get it, but i'm glad you find your answer :)

yayaa commented 7 years ago

Ok, i take some time to consider this and decided not to convert to provided because i believe not using GooglePlayServices is less common usecase than otherwise around. So, i don't wanna force everybody who uses this library to add compile ...gms as well, but it is possible to exclude if you don't need it.

Thanks for pointing out this, and also given the solution 👍