| Modifier and Type | Method and Description |
|---|---|
static SdkLoader |
getLoader(java.io.File treeLocation) |
com.google.common.collect.ImmutableList<java.io.File> |
getRepositories()
Returns the location of artifact repositories built-in the SDK.
|
SdkInfo |
getSdkInfo(com.android.utils.ILogger logger)
Returns generic SDK information.
|
TargetInfo |
getTargetInfo(java.lang.String targetHash,
com.android.repository.Revision buildToolRevision,
com.android.utils.ILogger logger,
SdkLibData sdkLibData)
Returns information about a build target.
|
java.io.File |
installSdkTool(SdkLibData sdkLibData,
java.lang.String packageId)
Installs an Android Sdk Tool if it's not already installed.
|
static void |
unload() |
java.util.List<java.io.File> |
updateRepositories(java.util.List<java.lang.String> repositoryPaths,
SdkLibData sdkLibData,
com.android.utils.ILogger logger)
Tries to update (or install) all local maven repositories and returns a list of directories
that were modified.
|
public static SdkLoader getLoader(@NonNull java.io.File treeLocation)
public static void unload()
@NonNull public TargetInfo getTargetInfo(@NonNull java.lang.String targetHash, @NonNull com.android.repository.Revision buildToolRevision, @NonNull com.android.utils.ILogger logger, @NonNull SdkLibData sdkLibData)
SdkLoadersdkLibData.useSdlDownload() is true. This requires loading/parsing the SDK.getTargetInfo in interface SdkLoadertargetHash - the compilation target hash string.buildToolRevision - the build tools revision.logger - a logger to output messages.sdkLibData - a wrapper containing all the components for downloading.@NonNull public SdkInfo getSdkInfo(@NonNull com.android.utils.ILogger logger)
SdkLoadergetSdkInfo in interface SdkLoaderlogger - a logger to output messages.@NonNull public com.google.common.collect.ImmutableList<java.io.File> getRepositories()
SdkLoadergetRepositories in interface SdkLoader@NonNull
public java.util.List<java.io.File> updateRepositories(@NonNull
java.util.List<java.lang.String> repositoryPaths,
@NonNull
SdkLibData sdkLibData,
@NonNull
com.android.utils.ILogger logger)
SdkLoaderupdateRepositories in interface SdkLoaderrepositoryPaths - a list of all install paths as described in RepoPackage of the
remote packages for the maven repositories. Eg.: extras;google;m2repositorysdkLibData - contains all the components for downloading.logger - a logger for messages.List of locations to the directories that contain the maven repositories.@Nullable
public java.io.File installSdkTool(@NonNull
SdkLibData sdkLibData,
@NonNull
java.lang.String packageId)
SdkLoaderinstallSdkTool in interface SdkLoadersdkLibData - contains all the components for downloading.packageId - the package/id path of the required Tool component.File representing the locations to the directory where the Tool component
is installed or null if we haven't managed to find such a component.