Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Build System for Gradle

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

like image 574
Shiv Kumar Ganesh Avatar asked Oct 11 '12 17:10

Shiv Kumar Ganesh


People also ask

How do I create a build system in Sublime Text?

Sublime Text is able to run build programs such as 'make', either when a key in pressed (F7 by default), or when a file is saved. The build system to use can be select from the Tools/Build System menu. If a project is open, the selected build system will be remembered for the project.

Where Are Sublime Text build systems stored?

All global configuration for Sublime (including installed packages) is stored in ~/. config/sublime-text-3 (or %APPDATA\Sublime Text 3 on Windows, or ~/Library/Application Support/Sublime Text 3 on Mac).

Can you compile in sublime?

Sublime Text provides build systems to allow users to run external programs. Examples of common uses for build systems include: compiling, transpiling, linting, and executing tests.


1 Answers

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é

like image 126
Rene Groeschke Avatar answered Oct 05 '22 04:10

Rene Groeschke