DependencyCache class
Disk-cache facade delegating resolution to MavenResolver.
Memoizes per-build resolution of Maven coordinates and Flutter AndroidX
artifacts: identical coordinates requested by many plugins hit the local
cache once, and in-flight requests share one future. Steps receive a
shared instance via constructors; --offline style builds pass
allowNetwork: false.
final cache = DependencyCache(cacheRoot: '${ctx.cacheDir}/maven');
final jar = await cache.resolve(
MavenCoordinate.parse('androidx.core:core-ktx:1.13.1')!,
);
Constructors
Properties
- cacheRoot → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- resolver → MavenResolver
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- verbose → bool
-
no setter
Methods
-
jarPathFor(
MavenCoordinate coord) → String -
localPathFor(
MavenCoordinate coord) → String -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
MavenCoordinate coord, {List< int> ? fixtureBytes, List<String> extraRepos = const []}) → Future<ResolvedJar> -
resolveFlutterAndroidX(
{Map< String, List< fixtures = const {}}) → Future<int> >List< ResolvedJar> > -
resolveWithTransitives(
List< MavenCoordinate> roots, {List<String> extraRepos = const [], int maxDepth = 2, int maxArtifacts = 250, void onFailure(MavenCoordinate coord, Object error)?}) → Future<List< ResolvedJar> > -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited