com.android.builder
Class PlatformSdkParser

java.lang.Object
  extended by com.android.builder.PlatformSdkParser
All Implemented Interfaces:
SdkParser

public class PlatformSdkParser
extends java.lang.Object
implements SdkParser

Implementation of SdkParser for the SDK prebuilds in the Android source tree.


Constructor Summary
PlatformSdkParser(java.lang.String sdkLocation)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlatformSdkParser

public PlatformSdkParser(@NonNull
                         java.lang.String sdkLocation)
Method Detail

initParser

public void initParser(@NonNull
                       java.lang.String target,
                       @NonNull
                       com.android.sdklib.repository.FullRevision buildToolRevision,
                       @NonNull
                       com.android.utils.ILogger logger)
Description copied from interface: SdkParser
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.

Specified by:
initParser in interface SdkParser
Parameters:
target - the target hash string.
buildToolRevision - the build tools revision
logger - a logger object.
See Also:
IAndroidTarget.hashString()

getTarget

@NonNull
public com.android.sdklib.IAndroidTarget getTarget()
Description copied from interface: SdkParser
Returns the compilation target

Specified by:
getTarget in interface SdkParser
Returns:
the target.

getBuildTools

@NonNull
public com.android.sdklib.BuildToolInfo getBuildTools()
Description copied from interface: SdkParser
Returns the BuildToolInfo

Specified by:
getBuildTools in interface SdkParser
Returns:
the build tool info

getAnnotationsJar

@NonNull
public java.lang.String getAnnotationsJar()
Description copied from interface: SdkParser
Returns the location of the annotations jar for compilation targets that are <= 15.

Specified by:
getAnnotationsJar in interface SdkParser

getPlatformToolsRevision

@Nullable
public com.android.sdklib.repository.FullRevision getPlatformToolsRevision()
Description copied from interface: SdkParser
Returns the revision of the installed platform tools component.

Specified by:
getPlatformToolsRevision in interface SdkParser
Returns:
the FullRevision or null if the revision couldn't not be found

getZipAlign

@NonNull
public java.io.File getZipAlign()
Description copied from interface: SdkParser
Returns the location of the zip align tool.

Specified by:
getZipAlign in interface SdkParser

getAdb

@NonNull
public java.io.File getAdb()
Description copied from interface: SdkParser
Returns the location of the adb tool.

Specified by:
getAdb in interface SdkParser

getRepositories

@NonNull
public java.util.List<java.io.File> getRepositories()
Description copied from interface: SdkParser
Returns the location of artifact repositories built-in the SDK.

Specified by:
getRepositories in interface SdkParser
Returns:
a non null list of repository folders.

getNdkLocation

@Nullable
public java.io.File getNdkLocation()
Specified by:
getNdkLocation in interface SdkParser