Replace replaceData = (Replace) antProject.createTask("replace");
replaceData.setFile(existingFile);
replaceData.setToken(tokenToReplace);
String stringWithProperLineEndings = adjustLineEndingsForOS(antProject.getProperty(fileVariable));
replaceData.setValue(stringWithProperLineEndings);
replaceData.execute();
}
/**
* This file is the same as the method above, except for different comment placeholder formats.
* Yeah, I know, it's ugly.