Skip to content
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

android-all not downloaded as part of robolectric, or is it a separate dependency? #7886

Closed
cooperkong opened this issue Dec 22, 2022 · 3 comments

Comments

@cooperkong
Copy link

cooperkong commented Dec 22, 2022

Description

as per title says, it seems android-all is not downloaded as part of robolectric, or do I need to declare it separately?

Steps to Reproduce

N/A

Robolectric & Android Version

4.9, android version is not related in thie issue

Link to a public git repo demonstrating the problem:

N/A

@cooperkong cooperkong changed the title android-all not downloaded as part of robolectric, or is it a seperate dependency? android-all not downloaded as part of robolectric, or is it a separate dependency? Dec 22, 2022
@hoisie
Copy link
Contributor

hoisie commented Dec 22, 2022

android-all jars are downloaded during runtime, lazily (when they are needed), using https://github.com/robolectric/robolectric/blob/master/plugins/maven-dependency-resolver/src/main/java/org/robolectric/internal/dependency/MavenDependencyResolver.java. They are downloaded from MavenCentral to your $HOME/.m2 directory

@cooperkong
Copy link
Author

cooperkong commented Dec 22, 2022

Thanks for quick reply! Yeah, that's what I thought too. We recently upgraded our wearable dependency and somehow wear unit tests start to fail due to missing libcore unless we add android-all manually, very strange.

PS: guess it's more of an wear issue, other than robolectric.

@hoisie
Copy link
Contributor

hoisie commented Dec 23, 2022

Yeah it is not recommended to depend on the android-all jars. They are only designed for robolectrics use. Those jars contain the framework implementation code, which includes hidden classes and methods. If you depend on it you will likely get broken across Sdk levels.

@hoisie hoisie closed this as not planned Won't fix, can't repro, duplicate, stale Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants