mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
eslint fix
This commit is contained in:
parent
18d6884522
commit
f54336eb61
@ -159,7 +159,6 @@ StudioBuilder.prototype.prepBuildFiles = function () {
|
|||||||
var root = this.root;
|
var root = this.root;
|
||||||
var insertExclude = function (p) {
|
var insertExclude = function (p) {
|
||||||
var gradlePath = path.join(root, p, 'build.gradle');
|
var gradlePath = path.join(root, p, 'build.gradle');
|
||||||
console.log("Gradle path for writing:" + gradlePath);
|
|
||||||
var projectGradleFile = fs.readFileSync(gradlePath, 'utf-8');
|
var projectGradleFile = fs.readFileSync(gradlePath, 'utf-8');
|
||||||
if (projectGradleFile.indexOf('CordovaLib') !== -1) {
|
if (projectGradleFile.indexOf('CordovaLib') !== -1) {
|
||||||
depsList += '{\n exclude module:("CordovaLib")\n }\n';
|
depsList += '{\n exclude module:("CordovaLib")\n }\n';
|
||||||
@ -170,7 +169,7 @@ StudioBuilder.prototype.prepBuildFiles = function () {
|
|||||||
subProjects.forEach(function (p) {
|
subProjects.forEach(function (p) {
|
||||||
console.log('Subproject Path: ' + p);
|
console.log('Subproject Path: ' + p);
|
||||||
var libName = p.replace(/[/\\]/g, ':').replace(name + '-', '');
|
var libName = p.replace(/[/\\]/g, ':').replace(name + '-', '');
|
||||||
if(libName !== 'app') {
|
if (libName !== 'app') {
|
||||||
depsList += ' implementation(project(path: ":' + libName + '"))';
|
depsList += ' implementation(project(path: ":' + libName + '"))';
|
||||||
insertExclude(p);
|
insertExclude(p);
|
||||||
}
|
}
|
||||||
@ -204,12 +203,11 @@ StudioBuilder.prototype.prepBuildFiles = function () {
|
|||||||
buildGradle = buildGradle.replace(/(SUB-PROJECT DEPENDENCIES START)[\s\S]*(\/\/ SUB-PROJECT DEPENDENCIES END)/, '$1\n' + depsList + ' $2');
|
buildGradle = buildGradle.replace(/(SUB-PROJECT DEPENDENCIES START)[\s\S]*(\/\/ SUB-PROJECT DEPENDENCIES END)/, '$1\n' + depsList + ' $2');
|
||||||
var includeList = '';
|
var includeList = '';
|
||||||
|
|
||||||
|
|
||||||
propertiesObj.gradleIncludes.forEach(function (includePath) {
|
propertiesObj.gradleIncludes.forEach(function (includePath) {
|
||||||
includeList += 'apply from: "' + includePath + '"\n';
|
includeList += 'apply from: "' + includePath + '"\n';
|
||||||
});
|
});
|
||||||
buildGradle = buildGradle.replace(/(PLUGIN GRADLE EXTENSIONS START)[\s\S]*(\/\/ PLUGIN GRADLE EXTENSIONS END)/, '$1\n' + includeList + '$2');
|
buildGradle = buildGradle.replace(/(PLUGIN GRADLE EXTENSIONS START)[\s\S]*(\/\/ PLUGIN GRADLE EXTENSIONS END)/, '$1\n' + includeList + '$2');
|
||||||
//This needs to be stored in the app gradle, not the root grade
|
// This needs to be stored in the app gradle, not the root grade
|
||||||
fs.writeFileSync(path.join(this.root, 'app', 'build.gradle'), buildGradle);
|
fs.writeFileSync(path.join(this.root, 'app', 'build.gradle'), buildGradle);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user