Search in sources :

Example 1 with ExternalSystemBeforeRunTask

use of com.intellij.openapi.externalSystem.service.execution.ExternalSystemBeforeRunTask in project azure-tools-for-java by microsoft.

the class BeforeRunTaskUtils method createGradleAssembleTask.

@NotNull
public static BeforeRunTask<?> createGradleAssembleTask(@NotNull ExternalProjectPojo project, @NotNull RunConfiguration config) {
    final GradleBeforeRunTaskProvider provider = new GradleBeforeRunTaskProvider(config.getProject());
    final ExternalSystemBeforeRunTask task = provider.createTask(config);
    task.getTaskExecutionSettings().setExternalSystemIdString(GradleConstants.SYSTEM_ID.toString());
    task.getTaskExecutionSettings().setExternalProjectPath(project.getPath());
    task.getTaskExecutionSettings().setTaskNames(Collections.singletonList(GRADLE_TASK_ASSEMBLE));
    return task;
}
Also used : GradleBeforeRunTaskProvider(org.jetbrains.plugins.gradle.execution.GradleBeforeRunTaskProvider) ExternalSystemBeforeRunTask(com.intellij.openapi.externalSystem.service.execution.ExternalSystemBeforeRunTask) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with ExternalSystemBeforeRunTask

use of com.intellij.openapi.externalSystem.service.execution.ExternalSystemBeforeRunTask in project azure-tools-for-java by Microsoft.

the class BeforeRunTaskUtils method createGradleAssembleTask.

@NotNull
public static BeforeRunTask<?> createGradleAssembleTask(@NotNull ExternalProjectPojo project, @NotNull RunConfiguration config) {
    final GradleBeforeRunTaskProvider provider = new GradleBeforeRunTaskProvider(config.getProject());
    final ExternalSystemBeforeRunTask task = provider.createTask(config);
    task.getTaskExecutionSettings().setExternalSystemIdString(GradleConstants.SYSTEM_ID.toString());
    task.getTaskExecutionSettings().setExternalProjectPath(project.getPath());
    task.getTaskExecutionSettings().setTaskNames(Collections.singletonList(GRADLE_TASK_ASSEMBLE));
    return task;
}
Also used : GradleBeforeRunTaskProvider(org.jetbrains.plugins.gradle.execution.GradleBeforeRunTaskProvider) ExternalSystemBeforeRunTask(com.intellij.openapi.externalSystem.service.execution.ExternalSystemBeforeRunTask) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ExternalSystemBeforeRunTask (com.intellij.openapi.externalSystem.service.execution.ExternalSystemBeforeRunTask)2 NotNull (org.jetbrains.annotations.NotNull)2 GradleBeforeRunTaskProvider (org.jetbrains.plugins.gradle.execution.GradleBeforeRunTaskProvider)2