gradle-grunt-plugin icon indicating copy to clipboard operation
gradle-grunt-plugin copied to clipboard

Grunt tasks aren't being loaded with the plugin?

Open ghost opened this issue 10 years ago • 3 comments

I'm having an issue from a fresh gradle project in intellij 13. I followed the install plugin, but maybe there's something I missed. here's my basic gradle file...there nothing really in it but your plugin. Sorry if this is simply a foolish error on my part...but I can't see what I'm missing.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.moowork.gradle:gradle-grunt-plugin:0.5'
    }
}

apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'grunt'

sourceCompatibility = 1.5
version = '1.0'

repositories {
    mavenCentral()
}

dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.11'
}

and here's the output when I try to fun gradle grunt_build:

Bryce@BRYCE-PC ~/Desktop/napi-2.0
$ gradle grunt_build
:nodeSetup SKIPPED
:grunt_build
A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started

Fatal error: Unable to find Gruntfile.                                                                            :
grunt_build                                                                    
FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':grunt_build'.
> Process 'command 'cmd'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 3.836 secs

Do I need to add these tasks manually? I thought your plugin would add them and connect them? Thanks for the help.

ghost avatar Jun 28 '14 23:06 ghost

Hi.

Do you have a Gruntfile.js inside your project folder where the build.gradle file is?

srs avatar Jun 29 '14 21:06 srs

So my folder structure is:

|--project-root
   |--gradle
            |--wrapper
   |--node_modules
            |--.bin
            |--grunt
            |--grunt-cli
                 |--GruntFile.js
   |--src
   |--build.gradle
|

So the Gruntfile.js gets loaded under the node_modules/grunt-cli/. I simply have Intellij automatically updated the project when the build file is altered. When I add in the gradel-grunt plugin, the node_modules and gradle folders are automatically added. Should I simply move the Gruntfile.js to the root?

ghost avatar Jul 01 '14 23:07 ghost

Yes. The gruntfile.js should be placed alongside build.gradle.

// srs

Den 2. juli 2014 kl. 01:26 skrev bchayden [email protected]:

So my folder structure is:

|--project-root |--gradle |--wrapper |--node_modules |--.bin |--grunt |--grunt-cli |--GruntFile.js |--src |--build.gradle | So the Gruntfile.js gets loaded under the node_modules/grunt-cli/. I simply have Intellij automatically updated the project when the build file is altered. When I add in the gradel-grunt plugin, the node_modules and gradle folders are automatically added. Should I simply move the Gruntfile.js to the root?

— Reply to this email directly or view it on GitHub.

srs avatar Jul 02 '14 07:07 srs