srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
867 stars 210 forks source link

Allow defining sourceSets #344

Open rocketraman opened 5 years ago

rocketraman commented 5 years ago

When importing a project into IntelliJ using Gradle, IntelliJ relies on Gradle's project model to determine what is a source directory.

For Java projects, one can use the sourceSets directive to configure this.

However, for JavaScript projects using this plugin, you just get the error:

> Could not find method sourceSets() for arguments [build_5aqvwz7r7otkodftzte4pzf0c$_run_closure1@6ed10bf8] on project ':x' of type org.gradle.api.Project.

Is there a way to allow defining a directory as "sources" so that IJ can configure the project model correctly?

deepy commented 5 years ago

I can't think of any major downsides of using the java plugin in a pure JavaScript project, so just apply that and you'll get sourceSets and all