All, I have a big suite of robolectric tests that ...
# compose
m
All, I have a big suite of robolectric tests that are testing our compose code. However, for whatever reason on CI, sometimes i get issues from what i assume is it trying (and failing) to download robolectric. Does anyone know if there’s a way to bundle the android platform with your repository so you can run robolectric in an offline mode? (Yes i know this isn’t compose specific, but it’s hindering our testing of compose things). Or at least prefetch them during standard artifact resolution so that they are cached locally.
Copy code
[2022-10-14T17:38:20.445Z]     java.lang.AssertionError at MavenArtifactFetcher.java:105

[2022-10-14T17:38:20.445Z]         Caused by: java.util.concurrent.ExecutionException at AbstractFuture.java:552

[2022-10-14T17:38:20.445Z]             Caused by: java.net.SocketException at SocketInputStream.java:186
e
you can set the robolectric.offline and robolectric.dependency.dir system properties
I previously used https://gist.github.com/b27b5b4cca59ee3b1af14b0b75dd33e2 to use Gradle to resolve the robolectric jars, haven't used it in a while though
282 Views