JetBrains/gradle-idea-ext-plugin

Support Gradle RunConfiguration

noproxy opened this issue · 2 comments

At now, GradleTask is supported as beforeRunTask of the Application run configuration. That cannot produce an correct run configuration because it lacks of Main class.

I add gradle task like this:

   configureByName(settings, "runConfigurations", RunConfigurationContainer.class, runConfigurations -> {
                runConfigurations.create("Upload Maven Library", Application.class, application -> {
                    application.setModuleName(project.getRootProject().getName());
                    application.beforeRun(beforeRun -> {
                        beforeRun.create("assemble", GradleTask.class, gradleTask -> {
                            gradleTask.setTask( getPublishTask());
                        });
                    });
                });
            });

And I will get the run configurations:

image

I think I need to generate the true Gradle Run Configurations:

image

I also encountered this issue and reported it in #47, but the issue was closed for some reason. The way GradleTask is currently defined, this cannot possibly work as described in v0.1 of the DSL spec, and I'm having difficulty understanding how "Gradle run configuration name"(Gradle) could work as described by @nskvortsov. Either the docs need to be updated, or a new DSL endpoint (e.g. GradleRC) needs to be defined that extends BaseRunConfiguration similar to TestNG and Application.

@breandan @noproxy I apologize for the confusion. I was sure the Gradle run configuration support was already implemented and did not check it properly. Indeed, there is no Gradle run configuration support at the moment (v 0.5, Ideal 2019.1)
I will re-open #47 and check it is properly implemented.