Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on December 30, 2015 at 07:06 AM

Section 1 (JavaScript)

exports.cliVersion = '>=3.2';

exports.init = function (logger, config, cli, appc) {
	var projectdir = config.appc.opts.projectDir+"/build/android/bin";
	
	cli.on('build.pre.construct', function (builder, next) {
		builder.proguard = true;
		logger.log('[PROGUARD] : Applying platform/android/proguard.cfg');
		 next();
	});
	cli.on('build.android.proguard', function(builder, next){
		logger.log('[PROGUARD]: Removing old class files so they can not be picked up.');
		
		appc.subprocess.findExecutable("/usr/bin/rm", function(error, remove){
			appc.subprocess.run(remove, ["-r",projectdir+"/classes_raw"], function(code, res, err){
				next();
			});
		});
	});
	cli.on('build.android.javac', function(builder, next){
		logger.log('[PROGUARD]: Moving classes for Proguard');
		
		appc.subprocess.findExecutable("/usr/bin/rm", function(error, remove){
			appc.subprocess.run(remove, ["-r",projectdir+"/classes_raw"], function(code, res, err){
				
				appc.subprocess.findExecutable("/usr/bin/mv", function(error, result){
					if(result){
						appc.subprocess.run(result, [projectdir+"/classes",projectdir+"/classes_raw"], function(code, res, err){
							next();					
						});
					}
				});
			});
		});
	});
};