New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOCK5 support (compatible with Gradle itself) #8750
Comments
It's a complicated issue. Currently, developers add Robolectric as dependency, and different people may use Robolectric to run tests for different Android SDK levels. Maybe one people only use Robolectric to run tests with SDK 34, and other people might use Robolectric to run tests across SDK 20 - SDK 34. So Robolectric encapsulates its internal logic to download necessary Robolectric's android-all jars based on test requirement separately. For the first scenario, Robolectric only downloads android-all for SDK 34. For the second scenario, Robolectric downloads multiple android-all jars for SDK 20 - SDK34. And Robolectric uses preinstrumented-jars now, and its version often bumps, and one version for one SDK is a new android-all jar on maven. It's not easy for developers to use proper android-all jar dependency in Gradle directly, so Robolectric manages it internally. Yep. Some people have suggested to create a Robolectric Gradle plugin for developers to configure and leverage Gradle's functionality to manage android-all jars with encapsulating details too from developers. But we don't have a great priority to support it. If you need some tips to make android-all jars downloading become stable, you can check https://robolectric.org/blog/2023/11/11/improving-android-all-downloading/. |
@tprochazka I am not aware of any standard If there is an improvement/enhancement related to Maven/Gradle we always welcome to PRs. A lot of teams have custom and esoteric maven environments that and have sent us PR to improve support. FWIW, fetching android-all jars happens lazily because they tend to be quite large (e.g. ~150MiB for Android U). If we were to fetch them all upfront it would be many gigabytes and it's possible many of them would be unused. As a general rule, it is very difficult to know upfront which SDKs are required for a test suite, as there are five or six ways to configure the SDK level last time I checked. |
Gradle itself has SOCK5 support simply by adding this to gradle.properties
But Robolectric failing with
Failed to fetch maven artifact org.robolectric:android-all-instrumented:4.4_r1-robolectric-r2-i4
Why is it simply not using the existing dependency fetching mechanism directly from Gradle which will automatically work in this situation?
The text was updated successfully, but these errors were encountered: