docs: function prepBuildFiles(root) {
      var propertiesObj = readProjectProperties(path.join(PLATFORM_DIR, 'project.properties'));
      var subProjects = propertiesObj.libs;
      // Update dependencies within build.gradle.
      var buildGradle = fs.readFileSync(path.join(PLATFORM_DIR, 'plugin-build.gradle'), 'utf-8');
      var depsList = '';
      subProjects.forEach(function (p) {
          var libName = p.replace(/[/\\]/g, ':').replace(name + '-', '');
          depsList += 'debugCompile project(path: "' + libName + '", configuration: "debug")\n';
          depsList += 'releaseCompile project(path: "' + libName + '", configuration: "release")\n';
      });
      // For why we do this mapping: https://issues.apache.org/jira/browse/CB-8390
      var SYSTEM_LIBRARY_MAPPINGS = [
          [/^\/?extras\/android\/support\/(.*)$/, 'com.android.support:support-$1:+'],
          [/^\/?google\/google_play_services\/libproject\/google-play-services_lib\/?$/, 'com.google.android.gms:play-services:+']
      ];
      propertiesObj.systemLibs.forEach(function (p) {
          var mavenRef;
          // It's already in gradle form if it has two ':'s
          if (/:.*:/.exec(p)) {
              mavenRef = p;
          } else {
              for (var i = 0; i < SYSTEM_LIBRARY_MAPPINGS.length; ++i) {
                  var pair = SYSTEM_LIBRARY_MAPPINGS[i];
                  if (pair[0].exec(p)) {
                      mavenRef = p.replace(pair[0], pair[1]);
                      break;
                  }
              }
              if (!mavenRef) {
                  throw new error('Unsupported system library (does not work with gradle): ' + p);
              }
          }
          depsList += 'compile "' + mavenRef + '"\n';
      });
      buildGradle = buildGradle.replace(/(SUB-PROJECT DEPENDENCIES START)[\s\S]*(\/\/ SUB-PROJECT DEPENDENCIES END)/, '$1\n' + depsList + '    $2');
      var includeList = '';
      propertiesObj.gradleIncludes.forEach(function (includePath) {
          includeList += 'apply from: "$projectDir/../../platforms/android/' + includePath + '"\n';
      });
      buildGradle = buildGradle.replace(/(PLUGIN GRADLE EXTENSIONS START)[\s\S]*(\/\/ PLUGIN GRADLE EXTENSIONS END)/, '$1\n' + includeList + '$2');
      fs.writeFileSync(path.join(PLATFORM_DIR, 'plugin-build.gradle'), buildGradle);
  }