facebookarchive / stetho

Stetho is a debug bridge for Android applications, enabling the powerful Chrome Developer Tools and much more.
http://facebook.github.io/stetho/
MIT License
12.66k stars 1.13k forks source link

Use AndroidX #665

Open cristan opened 4 years ago

cristan commented 4 years ago

Fixes #662

This enables people turning of jetifier when using Stetho.

consp1racy commented 4 years ago

Compile SDK version should be raised to 29 if it's not already. That may result in even more nullability annotations.

cristan commented 4 years ago

Compile SDK version should be raised to 29 if it's not already. That may result in even more nullability annotations.

consp1racy commented 4 years ago

I didn't find the compileOnly dependencies in changes. As you mentioned this should be it:

compileOnly 'androidx.lifecycle:lifecycle-common:2.0.0'
compileOnly 'androidx.lifecycle:lifecycle-viewmodel:2.0.0@aar'
compileOnly 'androidx.core:core:1.0.0@aar'
compileOnly 'androidx.fragment:fragment:1.0.0@aar'

I found this instead:

implementation 'androidx.fragment:fragment:1.0.0@aar'

The two approaches differ:

1) Keep implementation and force consumers manually excluding the dependency on fragments and core AndroidX. The consumers shouldn't need to know that Stetho can somehow use fragments. 2) Go with compileOnly and... that's it. The consumer will add fragment dependency if they wish to use fragments. And only then condiditional code in Stetho will kick in.

cristan commented 4 years ago

I didn't find the compileOnly dependencies in changes. As you mentioned this should be it:

compileOnly 'androidx.lifecycle:lifecycle-common:2.0.0'
compileOnly 'androidx.lifecycle:lifecycle-viewmodel:2.0.0@aar'
compileOnly 'androidx.core:core:1.0.0@aar'
compileOnly 'androidx.fragment:fragment:1.0.0@aar'

I found this instead:

implementation 'androidx.fragment:fragment:1.0.0@aar'

@consp1racy That's on purpose: I don't think this should be part of this PR anymore. That's because making the optional dependencies actually optional hasn't got anything to do with AndroidX. Therefore, let's just merge this PR and create a separate issue to make the dependency actually optional (or go the non-optional route and remove the realtime checks).

pandelisgreen13 commented 4 years ago

There is any update for next release with AndroidX?

erikghonyan commented 4 years ago

@cristan Thanks for getting the ball rolling! Are you still looking into this?

cristan commented 4 years ago

@cristan Thanks for getting the ball rolling! Are you still looking into this?

I don't think there's anything for me to do: all AndroidX related suggestions are implemented.

Unfortunately, this project seems to be dead: only 1 commit has been done on this project since March 2019 (see #677). I'm now using another solution, I suggest y'all do the same.

lmj0011 commented 3 years ago

I'm now using another solution, I suggest y'all do the same.

I assume that solution is Flipper?

cristan commented 3 years ago

It isn't. I've tried Flipper but I ran into this issue. That was in 2018 and despite saying this is something they'd like to improve, they never did. I now use chucker.

scottyab commented 3 years ago

Thanks for the work here @cristan.