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 byDefaultSdkProviderto locate SDK jars.Robolectric will attempt to find SDK jars in the following order:
- If the system property
robolectric-deps.propertiesis set, then Robolectric will look for a file with the specified path containing SDK references as describedhere. - If the system property
robolectric.dependency.diris 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.offlineis 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.propertiesis 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.dirsystem property, or providing your ownSdkProvider.
-
-
Constructor Summary
Constructors Constructor Description LegacyDependencyResolver(Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URLgetLocalArtifactUrl(DependencyJar dependency)URL[]getLocalArtifactUrls(DependencyJar dependency)Returns URLs representing the full transitive dependency graph of the given Maven dependency.
-
-
-
Constructor Detail
-
LegacyDependencyResolver
@Inject public LegacyDependencyResolver(Properties properties)
-
-
Method Detail
-
getLocalArtifactUrl
public URL getLocalArtifactUrl(DependencyJar dependency)
- Specified by:
getLocalArtifactUrlin interfaceDependencyResolver
-
getLocalArtifactUrls
public URL[] getLocalArtifactUrls(DependencyJar dependency)
Description copied from interface:DependencyResolverReturns URLs representing the full transitive dependency graph of the given Maven dependency.- Specified by:
getLocalArtifactUrlsin interfaceDependencyResolver
-
-