com.android.builder.sdk
Class PlatformLoader

java.lang.Object
  extended by com.android.builder.sdk.PlatformLoader
All Implemented Interfaces:
SdkLoader

public class PlatformLoader
extends java.lang.Object
implements SdkLoader

Singleton-based implementation of SdkLoader for a platform-based SDK. Platform-based SDK are in the Android source tree in AOSP, using a different folder layout for all the files.


Method Summary
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.sdklib.repository.FullRevision buildToolRevision, com.android.utils.ILogger logger)
          Returns information about a build target.
static void unload()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLoader

public static SdkLoader getLoader(@NonNull
                                  java.io.File treeLocation)

unload

public static void unload()

getTargetInfo

@NonNull
public TargetInfo getTargetInfo(@NonNull
                                        java.lang.String targetHash,
                                        @NonNull
                                        com.android.sdklib.repository.FullRevision buildToolRevision,
                                        @NonNull
                                        com.android.utils.ILogger logger)
Description copied from interface: SdkLoader
Returns information about a build target. This requires loading/parsing the SDK.

Specified by:
getTargetInfo in interface SdkLoader
Parameters:
targetHash - the compilation target hash string.
buildToolRevision - the build tools revision.
logger - a logger to output messages.
Returns:
the target info.

getSdkInfo

@NonNull
public SdkInfo getSdkInfo(@NonNull
                                  com.android.utils.ILogger logger)
Description copied from interface: SdkLoader
Returns generic SDK information. This requires loading/parsing the SDK.

Specified by:
getSdkInfo in interface SdkLoader
Parameters:
logger - a logger to output messages.
Returns:
the sdk info.

getRepositories

@NonNull
public com.google.common.collect.ImmutableList<java.io.File> getRepositories()
Description copied from interface: SdkLoader
Returns the location of artifact repositories built-in the SDK.

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