@NonNull
public static List<String> getBootClasspath(@NonNull SdkParser sdkParser) {
List<String> classpath = Lists.newArrayList();
IAndroidTarget target = sdkParser.getTarget();
classpath.addAll(target.getBootClasspath());
// add optional libraries if any
IAndroidTarget.IOptionalLibrary[] libs = target.getOptionalLibraries();
if (libs != null) {
for (IAndroidTarget.IOptionalLibrary lib : libs) {
classpath.add(lib.getJarPath());
}
}
// add annotations.jar if needed.
if (target.getVersion().getApiLevel() <= 15) {
classpath.add(sdkParser.getAnnotationsJar());
}
return classpath;
}