Sublime Forum

ST2: Questions about creating an ANT build system

#1

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

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.

{ "cmd": "ant"], "working_dir": "$project" }

{ "cmd": "ant"], "working_dir": "${project}" }

{ "cmd": "ant"], "working_dir": "${project_path}" }

{ "cmd": "ant"], "working_dir": "$project_path" }

0 Likes

#2

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]{
“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]"
    }
]

}[/code]

0 Likes