public class BuildToolInfo
extends java.lang.Object
For unit tests, see: - sdklib/src/test/.../LocalSdkTest - sdklib/src/test/.../SdkManagerTest - sdklib/src/test/.../BuildToolInfoTest
Modifier and Type | Class and Description |
---|---|
static class |
BuildToolInfo.PathId |
Modifier and Type | Field and Description |
---|---|
static int |
SDK_LEVEL_FOR_MULTIDEX_NATIVE_SUPPORT
First version with native multi-dex support.
|
Modifier and Type | Method and Description |
---|---|
static BuildToolInfo |
fromStandardDirectoryLayout(com.android.repository.Revision revision,
java.io.File path)
Creates a
BuildToolInfo from a directory which follows the standard layout
convention. |
java.io.File |
getLocation()
Returns the build-tool revision-specific folder.
|
java.lang.String |
getPath(BuildToolInfo.PathId pathId)
Returns the path of a build-tool component.
|
com.android.repository.Revision |
getRevision()
Returns the revision.
|
boolean |
isValid(com.android.utils.ILogger log)
Checks whether the build-tool is valid by verifying that the expected binaries
are actually present.
|
static BuildToolInfo |
modifiedLayout(com.android.repository.Revision revision,
java.io.File mainPath,
java.io.File aapt,
java.io.File aidl,
java.io.File dx,
java.io.File dxJar,
java.io.File llmvRsCc,
java.io.File androidRs,
java.io.File androidRsClang,
java.io.File bccCompat,
java.io.File ldArm,
java.io.File ldArm64,
java.io.File ldX86,
java.io.File ldX86_64,
java.io.File ldMips,
java.io.File zipAlign,
java.io.File aapt2)
Creates a full
BuildToolInfo from the specified paths. |
static BuildToolInfo |
partial(com.android.repository.Revision revision,
java.io.File location,
java.util.Map<BuildToolInfo.PathId,java.io.File> paths)
Creates a new
BuildToolInfo where only some tools are present. |
java.lang.String |
toString()
Returns a debug representation suitable for unit-tests.
|
public static final int SDK_LEVEL_FOR_MULTIDEX_NATIVE_SUPPORT
@NonNull public static BuildToolInfo fromStandardDirectoryLayout(@NonNull com.android.repository.Revision revision, @NonNull java.io.File path)
BuildToolInfo
from a directory which follows the standard layout
convention.@NonNull public static BuildToolInfo modifiedLayout(@NonNull com.android.repository.Revision revision, @NonNull java.io.File mainPath, @NonNull java.io.File aapt, @NonNull java.io.File aidl, @NonNull java.io.File dx, @NonNull java.io.File dxJar, @NonNull java.io.File llmvRsCc, @NonNull java.io.File androidRs, @NonNull java.io.File androidRsClang, @Nullable java.io.File bccCompat, @Nullable java.io.File ldArm, @Nullable java.io.File ldArm64, @Nullable java.io.File ldX86, @Nullable java.io.File ldX86_64, @Nullable java.io.File ldMips, @NonNull java.io.File zipAlign, @Nullable java.io.File aapt2)
BuildToolInfo
from the specified paths.
The Nullable
paths can only be null if corresponding tools were not present
in the specified version of build tools.
@NonNull public static BuildToolInfo partial(@NonNull com.android.repository.Revision revision, @NonNull java.io.File location, @NonNull java.util.Map<BuildToolInfo.PathId,java.io.File> paths)
BuildToolInfo
where only some tools are present.
This may be the case when paths are managed by an external build system.
@NonNull public com.android.repository.Revision getRevision()
@NonNull public java.io.File getLocation()
For compatibility reasons, use getPath(PathId)
if you need the path to a
specific tool.
public java.lang.String getPath(BuildToolInfo.PathId pathId)
pathId
- the id representing the path to return.public boolean isValid(@Nullable com.android.utils.ILogger log)
log
- An optional logger. If non-null, errors will be printed there.public java.lang.String toString()
toString
in class java.lang.Object