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:
I think I need to generate the true Gradle Run Configurations:
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
.