9

I want to have a custom build system but am really not able to make one. I have Gradle 1.2 installed and even the GRADLE_HOME is set correctly now I have the following commend in the build system file

{
   "cmd": ["gradle","build.gradle"],
   "path": "$project"
}

And the error I get is as follows (when I try to build my project):

[Errno 2] No such file or directory
[cmd:  [u'gradle', u'build.gradle']]
[dir:  /home/roger/Project/Visage/HelloWorld/src/main/visage/visage/javafx]
[path: $project]
[Finished]

Actually my Project Base directory is HelloWorld and I have my build.gradle there itself. Please help me to write the correct build system or give the correct commands to avoid error and execute successfully. I am currently using UBUNTU 12.04

2 Answers 2

14

I think you have to use a shell for your build system. and instead of path I guess you mean "working_dir". can you try this:

{
    "cmd": ["gradle"],
    "shell": "true",
    "working_dir": "${project_path}"
}

cheers,

René

2
  • This atleast seems to trigger my Gradle. I am not able to try it out here at my workplace due to proxy settings stuff. But ll update you asap. Oct 12, 2012 at 10:10
  • for quiet builds, use "cmd": ["gradle", "-q"],
    – Segfault
    Jul 22, 2014 at 14:10
0

Even shorter Gradle configuration in Sublime Text 3:

{
    "shell_cmd": "gradle",
    "working_dir": "${project_path}"
}

Go to menu 'Tools > Build System > New Build System...' and paste this text. Then save the configuration file as 'Gradle.sublime-build'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.