use of com.android.tools.idea.gradle.util.LocalProperties in project android by JetBrains.
the class SdkSyncTest method testSyncIdeAndProjectAndroidHomesWhenUserDoesNotSelectValidSdkPath.
public void testSyncIdeAndProjectAndroidHomesWhenUserDoesNotSelectValidSdkPath() throws Exception {
SdkSync.FindValidSdkPathTask task = new SdkSync.FindValidSdkPathTask(myIdeSdks) {
@Nullable
@Override
File selectValidSdkPath() {
return null;
}
};
try {
mySdkSync.syncIdeAndProjectAndroidSdk(myLocalProperties, task, myProject);
fail("Expecting ExternalSystemException");
} catch (ExternalSystemException e) {
// expected
}
assertNull(myIdeSdks.getAndroidSdkPath());
myLocalProperties = new LocalProperties(myProject);
assertNull(myLocalProperties.getAndroidSdkPath());
}
use of com.android.tools.idea.gradle.util.LocalProperties in project android by JetBrains.
the class SdkSyncTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
AndroidTestCaseHelper.removeExistingAndroidSdks();
myLocalProperties = new LocalProperties(myProject);
myAndroidSdkPath = TestUtils.getSdk();
myIdeSdks = IdeSdks.getInstance();
mySdkSync = new SdkSync(myIdeSdks);
assertNull(myIdeSdks.getAndroidSdkPath());
}
Aggregations