If you need to assign global variable you can use Alloy.Globals
object:
Alloy.Globals.myVar = 12;
Also instead of using Ti.include, it's much better to use require();
and convert your code to CommonJS module, so you will be able set which variable and functions you want to export:
/app/lib/util.js:
var privateValue = 'foo';
var publicValue = 'bar';
function getValues() {
return [privateValue, publicValue];
}
module.exports = {
publicValue: publicValue,
getValues: getValues,
};
/app/controllers/index.js:
var util = require('/util');
Ti.App.info(util.privateValue); // undefined
Ti.App.info(util.publicValue); // 'bar'
util.publicValue = 'foobar';
Ti.App.info(util.getValues()); // [ 'foo', 'foobar' ];