Package org.robolectric.plugins
Class LegacyDependencyResolver
java.lang.Object
org.robolectric.plugins.LegacyDependencyResolver
- All Implemented Interfaces:
DependencyResolver
@AutoService(DependencyResolver.class) @Priority(-2147483648) public class LegacyDependencyResolver extends Object implements DependencyResolver
Robolectric's historical dependency resolver (which is currently still the default), which is
used by
DefaultSdkProvider
to locate SDK jars.
Robolectric will attempt to find SDK jars in the following order:
- If the system property
robolectric-deps.properties
is set, then Robolectric will look for a file with the specified path containing SDK references as describedhere
. - If the system property
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
). - If the system property
robolectric.offline
is true, then Robolectric will look for SDK jars in the current working directory with Maven artifact-style names. - If a resource file named
robolectric-deps.properties
is found on the classpath, then Robolectric will resolve SDKs with that file as describedhere
. - Otherwise the jars will be downloaded from Maven Central and cached locally.
robolectric.dependency.dir
system property, or providing your own SdkProvider
.-
Constructor Summary
Constructors Constructor Description LegacyDependencyResolver(Properties properties)
-
Method Summary
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.
-
Constructor Details
-
Method Details
-
getLocalArtifactUrl
- Specified by:
getLocalArtifactUrl
in interfaceDependencyResolver
-
getLocalArtifactUrls
Description copied from interface:DependencyResolver
Returns URLs representing the full transitive dependency graph of the given Maven dependency.- Specified by:
getLocalArtifactUrls
in interfaceDependencyResolver
-