module.exports = function(ctx) {
    var fs = ctx.requireCordovaModule('fs'),
        path = ctx.requireCordovaModule('path'),
        os = require("os"),
        readline = require("readline"),
        deferral = ctx.requireCordovaModule('q').defer();

    var lineReader = readline.createInterface({
        terminal: false,
        input : fs.createReadStream('platforms/android/build.gradle')
    });
    lineReader.on("line", function(line) {
        fs.appendFileSync('./build.gradle', line.toString() + os.EOL);
        if (/.*\ dependencies \{.*/.test(line)) {
            fs.appendFileSync('./build.gradle', '\t\tclasspath "io.realm:realm-gradle-plugin:3.7.2"' + os.EOL);
        }
    }).on("close", function () {
        fs.rename('./build.gradle', 'platforms/android/build.gradle', deferral.resolve);
    });

    return deferral.promise;
};
@@ -1,8 +1,29 @@
+#!/usr/bin/env node%0A%0A
 module.e

add node env