DependencyResolver
@AutoService(DependencyResolver.class) @Priority(-2147483648) public class LegacyDependencyResolver extends Object implements DependencyResolver
DefaultSdkProvider
to locate SDK jars.
Robolectric will attempt to find SDK jars in the following order:
robolectric-deps.properties
is set, then Robolectric will
look for a file with the specified path containing SDK references as described here
.
robolectric.dependency.dir
is set, then Robolectric will
look for SDK jars in the given directory with Maven artifact-style names (e.g.
android-all-7.1.0_r7-robolectric-r1.jar
).
robolectric.offline
is true, then Robolectric will look for
SDK jars in the current working directory with Maven artifact-style names.
robolectric-deps.properties
is found on the classpath,
then Robolectric will resolve SDKs with that file as described here
.
robolectric.dependency.dir
system property, or providing your own SdkProvider
.Constructor | Description |
---|---|
LegacyDependencyResolver(Properties properties) |
Modifier and Type | Method | Description |
---|---|---|
URL |
getLocalArtifactUrl(DependencyJar dependency) |
|
URL[] |
getLocalArtifactUrls(DependencyJar dependency) |
Returns URLs representing the full transitive dependency graph of the given Maven dependency.
|
@Inject public LegacyDependencyResolver(Properties properties)
public URL getLocalArtifactUrl(DependencyJar dependency)
getLocalArtifactUrl
in interface DependencyResolver
public URL[] getLocalArtifactUrls(DependencyJar dependency)
DependencyResolver
getLocalArtifactUrls
in interface DependencyResolver