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

The original intention of integration_tests/dependency-on-stubs has been lost #8962

Closed
hoisie opened this issue Apr 2, 2024 · 0 comments
Closed

Comments

@hoisie
Copy link
Contributor

hoisie commented Apr 2, 2024

From https://github.com/robolectric/robolectric/blob/master/integration_tests/dependency-on-stubs/build.gradle#L5:

// test with a project that depends on the stubs jar, not org.robolectric:android-all

However, that build.gradle now compiles against android-all and includes it on the runtime classpath.

I think we should remove the runtime dependency on org.robolectric:android-all.

This came up in b9c768d. I tried adding a new test class to this module, but with the android-all dependency, that test could not be written properly.

hoisie added a commit that referenced this issue Apr 2, 2024
The original intent of this test is to ensure that the runtime classpath does
not contain the android-all jar.

Also, stop hardcoding android-29 in the dependency-on-stubs build.gradle. It is
not guaranteed that android-29 will be installed. Instead, depend on the most
recent android.jar that is available.

Fixes #8962

PiperOrigin-RevId: 621319822
copybara-service bot pushed a commit that referenced this issue Apr 5, 2024
There were several issues with the  dependency-on-stubs build.gradle:

1) The original intent of this test is to ensure that the runtime classpath
does not contain the android-all jar, but the android-all was explicitly being
used in the runtime classpath.

2) The android-29 stubs jar was hardcoded in the dependency-on-stubs
build.gradle. It is not guaranteed that android-29 will be installed.

Update the dependency-on-stubs to use AGP, and remove the runtime dependency on
android-all.

Fixes #8962

PiperOrigin-RevId: 621319822
copybara-service bot pushed a commit that referenced this issue Apr 5, 2024
There were several issues with the dependency-on-stubs build.gradle:

1) The original intent of this test is to ensure that the runtime classpath
does not contain the android-all jar, but the android-all was explicitly being
used in the runtime classpath.

2) The android-29 stubs jar was hardcoded in the dependency-on-stubs
build.gradle. It is not guaranteed that android-29 will be installed.

Update the dependency-on-stubs to use AGP, and remove the runtime dependency on
android-all.

Fixes #8962

PiperOrigin-RevId: 621319822
@hoisie hoisie closed this as completed in 479f1fc Apr 29, 2024
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

1 participant