com.android.builder
Interface SdkParser

All Known Implementing Classes:
DefaultSdkParser, PlatformSdkParser

public interface SdkParser

A parser able to parse the SDK and return valuable information to the build system.


Method Summary
 java.io.File getAdb()
          Returns the location of the adb tool.
 java.lang.String getAnnotationsJar()
          Returns the location of the annotations jar for compilation targets that are <= 15.
 com.android.sdklib.BuildToolInfo getBuildTools()
          Returns the BuildToolInfo
 java.io.File getNdkLocation()
           
 com.android.sdklib.repository.FullRevision getPlatformToolsRevision()
          Returns the revision of the installed platform tools component.
 java.util.List<java.io.File> getRepositories()
          Returns the location of artifact repositories built-in the SDK.
 com.android.sdklib.IAndroidTarget getTarget()
          Returns the compilation target
 java.io.File getZipAlign()
          Returns the location of the zip align tool.
 void initParser(java.lang.String target, com.android.sdklib.repository.FullRevision buildToolRevision, com.android.utils.ILogger logger)
          Inits the parser with a target hash string and a build tools FullRevision.
 

Method Detail

initParser

void initParser(@NonNull
                java.lang.String target,
                @NonNull
                com.android.sdklib.repository.FullRevision buildToolRevision,
                @NonNull
                com.android.utils.ILogger logger)
Inits the parser with a target hash string and a build tools FullRevision. Note that this may be called several times on the same object, though it will always be with the same values. Extra calls can be ignored.

Parameters:
target - the target hash string.
buildToolRevision - the build tools revision
logger - a logger object.
Throws:
java.lang.IllegalStateException - if the SDK cannot parsed.
See Also:
IAndroidTarget.hashString()

getTarget

@NonNull
com.android.sdklib.IAndroidTarget getTarget()
Returns the compilation target

Returns:
the target.
Throws:
java.lang.IllegalStateException - if the sdk was not initialized.

getBuildTools

@NonNull
com.android.sdklib.BuildToolInfo getBuildTools()
Returns the BuildToolInfo

Returns:
the build tool info
Throws:
java.lang.IllegalStateException - if the sdk was not initialized.

getAnnotationsJar

@NonNull
java.lang.String getAnnotationsJar()
Returns the location of the annotations jar for compilation targets that are <= 15.


getPlatformToolsRevision

@Nullable
com.android.sdklib.repository.FullRevision getPlatformToolsRevision()
Returns the revision of the installed platform tools component.

Returns:
the FullRevision or null if the revision couldn't not be found

getZipAlign

@NonNull
java.io.File getZipAlign()
Returns the location of the zip align tool.


getAdb

@NonNull
java.io.File getAdb()
Returns the location of the adb tool.


getRepositories

@NonNull
java.util.List<java.io.File> getRepositories()
Returns the location of artifact repositories built-in the SDK.

Returns:
a non null list of repository folders.

getNdkLocation

@Nullable
java.io.File getNdkLocation()