Class GradleLocalFileFinder
- java.lang.Object
-
- com.lingocoder.file.GradleLocalFileFinder
-
- All Implemented Interfaces:
CachedArtifactFinder
public class GradleLocalFileFinder extends java.lang.Object implements CachedArtifactFinder
Searches a local Gradle installation for locally-cached artifacts.
Consumers of this class are responsible for installing and configuring Gradle with the standard Gradle environment variables. For example,
GRADLE_USER_HOME
.
-
-
Constructor Summary
Constructors Constructor Description GradleLocalFileFinder()
Create an instance with default state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepoResult
find(java.lang.String coordinates)
Searches a dependency management system's locally-cached artifacts.
-
-
-
Constructor Detail
-
GradleLocalFileFinder
public GradleLocalFileFinder()
Create an instance with default state. The created instance will attempt to locate and work with a local Gradle installation's file system dependency cache it assumes will be installed at a standard default location. It will look for environment variables such as
GRADLE_USER_HOME
andGRADLE_HOME
.If no such environment is found, it will assume the caller intends for this instance to work with a Gradle installation located in the home directory of the current user.
The methods of this instance operate in the context of the locations described above.
-
-
Method Detail
-
find
public RepoResult find(java.lang.String coordinates)
Description copied from interface:CachedArtifactFinder
Searches a dependency management system's locally-cached artifacts.
This operation assumes artifact caches can be found at certain standard locations on the local file system.
- Specified by:
find
in interfaceCachedArtifactFinder
- Parameters:
coordinates
- A non-empty, colon-delimited string of the form: „group:artifact:version[:classifier]“. Commonly referred to as „GAV“ coordinates, this is the standard addressing scheme dependency management systems use to distinguish individual modules from one another.- Returns:
- A composite result that
Optional
ly holds the artifact specified by the givencoordinates
(if found) and its parent folder.
-
-