Home Download Buy Blog Forum Support

ST2: Questions about creating an ANT build system

ST2: Questions about creating an ANT build system

Postby tangst on Wed Jan 30, 2013 4:33 pm

Hi,
I don't know if it is possible to do this, so I wanted to see if anybody here could let me know if this is possible. This is for OSX.

I want to store all my Sublime Text (ST) project files in a directory that are separated from the working directories that have code. This is because I'm storing the code is managed by SVN, and I don't want to check in the Sublime Text project files.

Since I moved the ST project files out of the working directory, the default ST ant build no longer works

Code: Select all
Buildfile: build.xml does not exist!
Build failed
[Finished in 0.3s with exit code 1]


I was wondering if there was a way to create a single build file system that knows to go to the project's path and look for the build.xml file there. I don't want to create a build system for every project, if that is possible. I noticed that the project file itself lists the path to the working directory.

I tried the following and they don't work.

Code: Select all
{
   "cmd": ["ant"],
   "working_dir": "$project"
}


Code: Select all
{
   "cmd": ["ant"],
   "working_dir": "${project}"
}


Code: Select all
{
   "cmd": ["ant"],
   "working_dir": "${project_path}"
}


Code: Select all
{
   "cmd": ["ant"],
   "working_dir": "$project_path"
}
tangst
 
Posts: 2
Joined: Wed Jan 30, 2013 4:22 pm

Re: ST2: Questions about creating an ANT build system

Postby tangst on Wed Jan 30, 2013 4:58 pm

Upon further investigation, the closest thing I can find is to add a build system to the project file. Unfortunately, this means I'll have a list of build systems showing up in the Tools menu.

Code: Select all
{
   "folders":
   [
      {
         "path": "[PATH TO WORKING DIRECTORY FROM PROJECT FILE'S VIEW]"
      }
   ],
   "build_systems":
    [
        {
            "name": "[NAME OF BUILD SYSTEM",
            "cmd": ["ant"],
            "working_dir": "[FULL EXPLICIT PATH TO WORKING DIRECTORY]"
        }
    ]
}
tangst
 
Posts: 2
Joined: Wed Jan 30, 2013 4:22 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 15 guests