Gradle plugin checks for connected devices at configuration time
jschear opened this issue · 2 comments
Hi! I've noticed that when gradle is configuring my app
project (which has the OkReplay gradle plugin applied), I see this output in the console if I don't have any android devices connected:
> Configure project :app
No connected devices!
No connected devices!
No connected devices!
(We have three build variants.)
I think what's happening is that when the OkReplay tasks are setup, a DeviceBridge
is created, which eagerly calls ConnectedDeviceProvider#init()
, which in turn uses adb
to check for connected devices.
I think this call to init()
should probably be moved out of the configuration stage, and into the tasks themselves (it looks like this is what the Android Gradle Plugin does with DeviceProviderInstrumentTestTask
by using the newer DeviceProvider.use
API). I imagine this will cut down configuration time a tiny bit for all of our builds.
If y'all agree, I'm happy to open a PR to do so.
Should be fixed by #99
Fixed bu #99