public static synchronized SdkLoader getLoader( @NonNull File treeLocation) { if (sLoader == null) { sLoader = new PlatformLoader(treeLocation); } else if (!treeLocation.equals(sLoader.mTreeLocation)) { throw new IllegalStateException("Already created an SDK Loader with different SDK Path"); } return sLoader; }
public synchronized void unload() { if (sdkLoader != null) { if (isRegularSdk) { DefaultSdkLoader.unload(); } else { PlatformLoader.unload(); } sdkLoader = null; } }
@NonNull @Override public TargetInfo getTargetInfo(@NonNull String targetHash, @NonNull FullRevision buildToolRevision, @NonNull ILogger logger) { init(logger); IAndroidTarget androidTarget = new FakeAndroidTarget(mTreeLocation.getPath(), targetHash); File hostTools = getHostToolsFolder(); BuildToolInfo buildToolInfo = new BuildToolInfo( buildToolRevision, mTreeLocation, new File(hostTools, FN_AAPT), new File(hostTools, FN_AIDL), new File(mTreeLocation, "prebuilts/sdk/tools/dx"), new File(mTreeLocation, "prebuilts/sdk/tools/lib/dx.jar"), new File(hostTools, FN_RENDERSCRIPT), new File(mTreeLocation, "prebuilts/sdk/renderscript/include"), new File(mTreeLocation, "prebuilts/sdk/renderscript/clang-include"), new File(hostTools, FN_BCC_COMPAT), new File(hostTools, "arm-linux-androideabi-ld"), new File(hostTools, "i686-linux-android-ld"), new File(hostTools, "mipsel-linux-android-ld"), new File(hostTools, FN_ZIPALIGN)); return new TargetInfo(androidTarget, buildToolInfo); }
@NonNull @Override public SdkInfo getSdkInfo(@NonNull ILogger logger) { init(logger); return mSdkInfo; }
public synchronized SdkLoader getSdkLoader() { if (sdkLoader == null) { if (isRegularSdk) { getAndCheckSdkFolder(); // check if the SDK folder actually exist. // For internal test we provide a fake SDK location through // setTestSdkFolder in order to have an SDK, even though we don't use it // so in this case we ignore the check. if (sTestSdkFolder == null && !sdkFolder.isDirectory()) { throw new RuntimeException(String.format( "The SDK directory '%1$s' does not exist.", sdkFolder)); } sdkLoader = DefaultSdkLoader.getLoader(sdkFolder); } else { sdkLoader = PlatformLoader.getLoader(sdkFolder); } } return sdkLoader; }
@NonNull @Override public TargetInfo getTargetInfo( @NonNull String targetHash, @NonNull Revision buildToolRevision, @NonNull ILogger logger, @NonNull SdkLibData sdkLibData) { init(logger); IAndroidTarget androidTarget = new FakeAndroidTarget(mTreeLocation.getPath(), targetHash); File hostTools = getHostToolsFolder(); BuildToolInfo buildToolInfo = BuildToolInfo.modifiedLayout( buildToolRevision, mTreeLocation, new File(hostTools, FN_AAPT), new File(hostTools, FN_AIDL), new File(mTreeLocation, "prebuilts/sdk/tools/dx"), new File(mTreeLocation, "prebuilts/sdk/tools/lib/dx.jar"), new File(hostTools, FN_RENDERSCRIPT), new File(mTreeLocation, "prebuilts/sdk/renderscript/include"), new File(mTreeLocation, "prebuilts/sdk/renderscript/clang-include"), new File(hostTools, FN_BCC_COMPAT), new File(hostTools, "arm-linux-androideabi-ld"), new File(hostTools, "aarch64-linux-android-ld"), new File(hostTools, "i686-linux-android-ld"), new File(hostTools, "x86_64-linux-android-ld"), new File(hostTools, "mipsel-linux-android-ld"), new File(hostTools, FN_ZIPALIGN), new File(hostTools, FN_AAPT2)); return new TargetInfo(androidTarget, buildToolInfo); }
@NonNull @Override public SdkInfo getSdkInfo(@NonNull ILogger logger) { init(logger); return mSdkInfo; }
public synchronized SdkLoader getSdkLoader() { if (sdkLoader == null) { if (isRegularSdk) { getAndCheckSdkFolder(); // check if the SDK folder actually exist. // For internal test we provide a fake SDK location through // setTestSdkFolder in order to have an SDK, even though we don't use it // so in this case we ignore the check. if (sTestSdkFolder == null && !sdkFolder.isDirectory()) { throw new RuntimeException(String.format( "The SDK directory '%1$s' does not exist.", sdkFolder)); } sdkLoader = DefaultSdkLoader.getLoader(sdkFolder); } else { sdkLoader = PlatformLoader.getLoader(sdkFolder); } } return sdkLoader; }
public static synchronized SdkLoader getLoader( @NonNull File treeLocation) { if (sLoader == null) { sLoader = new PlatformLoader(treeLocation); } else if (!treeLocation.equals(sLoader.mTreeLocation)) { throw new IllegalStateException(String.format( "%s already created using %s; cannot also use %s", PlatformLoader.class.getSimpleName(), sLoader.mTreeLocation, treeLocation)); } return sLoader; }
public synchronized void unload() { if (sdkLoader != null) { if (isRegularSdk) { DefaultSdkLoader.unload(); } else { PlatformLoader.unload(); } sdkLoader = null; } }