Skip to content

Commit

Permalink
Ripped out JSS. It's been deprecated for a long time. It has no docs.…
Browse files Browse the repository at this point in the history
… It has to die.
  • Loading branch information
cb1kenobi committed Jul 24, 2015
1 parent bc6a121 commit 1ec381e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 72 deletions.
33 changes: 0 additions & 33 deletions android/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,6 @@ AndroidBuilder.prototype.run = function run(logger, config, cli, finished) {
'processTiSymbols',
'copyModuleResources',
'removeOldFiles',
'compileJSS',
'generateJavaFiles',
'generateAidl',

Expand Down Expand Up @@ -1849,9 +1848,6 @@ AndroidBuilder.prototype.computeHashes = function computeHashes(next) {
return hashes;
}

// jss files
this.jssFilesHash = this.hash(walk(path.join(this.projectDir, 'Resources'), /\.jss$/).join(','));

next();
};

Expand Down Expand Up @@ -2090,13 +2086,6 @@ AndroidBuilder.prototype.checkIfShouldForceRebuild = function checkIfShouldForce
return true;
}

if (this.jssFilesHash != manifest.jssFilesHash) {
this.logger.info(__('Forcing rebuild: One or more JSS files changed since last build'));
this.logger.info(' ' + __('Was: %s', manifest.jssFilesHash));
this.logger.info(' ' + __('Now: %s', this.jssFilesHash));
return true;
}

if (this.config.get('android.mergeCustomAndroidManifest', false) != manifest.mergeCustomAndroidManifest) {
this.logger.info(__('Forcing rebuild: mergeCustomAndroidManifest config has changed since last build'));
this.logger.info(' ' + __('Was: %s', manifest.mergeCustomAndroidManifest));
Expand Down Expand Up @@ -2394,11 +2383,6 @@ AndroidBuilder.prototype.copyResources = function copyResources(next) {
next();
break;

case 'jss':
// ignore, these will be compiled later by compileJSS()
next();
break;

case 'xml':
if (_t.xmlMergeRegExp.test(filename)) {
_t.cli.createHook('build.android.copyResource', _t, function (from, to, cb) {
Expand Down Expand Up @@ -3068,22 +3052,6 @@ AndroidBuilder.prototype.removeOldFiles = function removeOldFiles(next) {
next();
};

AndroidBuilder.prototype.compileJSS = function compileJSS(callback) {
ti.jss.load(path.join(this.projectDir, 'Resources'), ['android'], this.logger, function (results) {
fs.writeFile(
path.join(this.buildGenAppIdDir, 'ApplicationStylesheet.java'),
ejs.render(fs.readFileSync(path.join(this.templatesDir, 'ApplicationStylesheet.java')).toString(), {
appid: this.appid,
classes: appc.util.mix({}, results.classes, results.tags),
classesDensity: appc.util.mix({}, results.classes_density, results.tags_density),
ids: results.ids,
idsDensity: results.ids_density
}),
callback
);
}.bind(this));
};

AndroidBuilder.prototype.generateJavaFiles = function generateJavaFiles(next) {
if (!this.forceRebuild) return next();

Expand Down Expand Up @@ -4209,7 +4177,6 @@ AndroidBuilder.prototype.writeBuildManifest = function writeBuildManifest(callba
propertiesHash: this.propertiesHash,
activitiesHash: this.activitiesHash,
servicesHash: this.servicesHash,
jssFilesHash: this.jssFilesHash,
jarLibHash: this.jarLibHash
}, callback);
};
Expand Down
39 changes: 0 additions & 39 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,6 @@ iOSBuilder.prototype.run = function (logger, config, cli, finished) {
'cleanXcodeDerivedData',

// titanium related tasks
'compileJSSFiles',
'copyAppIcons',
'copyItunesArtwork',
'copyTitaniumFiles',
Expand Down Expand Up @@ -3358,40 +3357,6 @@ iOSBuilder.prototype.cleanXcodeDerivedData = function cleanXcodeDerivedData(next
}.bind(this));
};

iOSBuilder.prototype.compileJSSFiles = function compileJSSFiles(next) {
this.logger.info(__('Compiling JSS files'));

ti.jss.load(path.join(this.projectDir, 'Resources'), this.deviceFamilyNames[this.deviceFamily], this.logger, function (results) {
var dest = path.join(this.xcodeAppDir, 'stylesheet.plist'),
plist = new appc.plist(),
contents;

appc.util.mix(plist, results);
contents = plist.toString('xml');

this.currentBuildManifest.files['stylesheet.plist'] = {
hash: this.hash(contents),
mtime: 0,
size: contents.length
};

if (!fs.existsSync(dest) || contents !== fs.readFileSync(dest).toString()) {
if (!this.forceRebuild && /device|dist\-appstore|dist\-adhoc/.test(this.target)) {
this.logger.info(__('Forcing rebuild: %s has changed since last build', 'stylesheet.plist'));
this.forceRebuild = true;
}
this.logger.debug(__('Writing %s', dest.cyan));
fs.writeFileSync(dest, contents);
} else {
this.logger.trace(__('No change, skipping %s', dest.cyan));
}

delete this.buildDirFiles[dest];

next();
}.bind(this));
};

iOSBuilder.prototype.copyAppIcons = function copyAppIcons() {
this.logger.info(__('Copying app icons'));

Expand Down Expand Up @@ -3504,10 +3469,6 @@ iOSBuilder.prototype.copyTitaniumFiles = function copyTitaniumFiles(next) {
jsFiles[relPath] = info;
break;

case 'jss':
// ignore, these are taken care of by compileJSSFiles()
break;

case 'css':
cssFiles[relPath] = info;
break;
Expand Down

0 comments on commit 1ec381e

Please sign in to comment.