use of com.android.tools.idea.gradle.stubs.gradle.IdeaProjectStub in project android by JetBrains.
the class SyncActionTest method setUp.
@Before
public void setUp() {
myBuildController = mock(BuildController.class);
myProject = new IdeaProjectStub("myProject");
myAndroidProject = TestProjects.createBasicProject(myProject.getRootDir());
myModule = myProject.addModule(myAndroidProject.getName(), "androidTask");
}
use of com.android.tools.idea.gradle.stubs.gradle.IdeaProjectStub in project android by JetBrains.
the class AndroidGradleProjectResolverIdeaTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
initMocks(this);
myProjectModel = new IdeaProjectStub("multiProject");
myAndroidProject = TestProjects.createBasicProject(myProjectModel.getRootDir());
myNativeAndroidProject = TestProjects.createNativeProject(myProjectModel.getRootDir());
myAndroidModuleModel = myProjectModel.addModule(myAndroidProject.getName(), "androidTask");
myNativeAndroidModuleModel = myProjectModel.addModule(myNativeAndroidProject.getName(), "nativeAndroidTask");
myJavaModuleModel = myProjectModel.addModule("util", "compileJava", "jar", "classes");
myProjectModel.addModule("notReallyAGradleProject");
ProjectImportAction.AllModels allModels = new ProjectImportAction.AllModels(myProjectModel);
allModels.addExtraProject(myAndroidProject, AndroidProject.class, myAndroidModuleModel);
allModels.addExtraProject(myNativeAndroidProject, NativeAndroidProject.class, myNativeAndroidModuleModel);
ExternalSystemTaskId id = ExternalSystemTaskId.create(SYSTEM_ID, RESOLVE_PROJECT, myProjectModel.getName());
String projectPath = toSystemDependentName(myProjectModel.getBuildFile().getParent());
ExternalSystemTaskNotificationListener notificationListener = new ExternalSystemTaskNotificationListenerAdapter() {
};
myResolverCtx = new DefaultProjectResolverContext(id, projectPath, null, mock(ProjectConnection.class), notificationListener, true);
myResolverCtx.setModels(allModels);
myProjectResolver = new AndroidGradleProjectResolver(myCommandLineArgs, myErrorHandler, myProjectFinder, myVariantSelector);
myProjectResolver.setProjectResolverContext(myResolverCtx);
GradleProjectResolverExtension next = new BaseGradleProjectResolverExtension();
next.setProjectResolverContext(myResolverCtx);
myProjectResolver.setNext(next);
}
use of com.android.tools.idea.gradle.stubs.gradle.IdeaProjectStub in project android by JetBrains.
the class GradleModuleSetupTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
initMocks(this);
Project project = getProject();
IdeComponents.replaceService(project, GradleSyncState.class, mySyncState);
String moduleName = "app";
myModule = createModule(moduleName);
IdeaProjectStub projectModel = new IdeaProjectStub(project.getName());
myModuleModel = projectModel.addModule(moduleName, "task1", "task2");
mySyncSummary = new GradleSyncSummary(project);
when(mySyncState.getSummary()).thenReturn(mySyncSummary);
myModelsProvider = new IdeModifiableModelsProviderImpl(project);
myModuleSetup = new GradleModuleSetup();
}
Aggregations