Is it possible to manually edit the settings.gradle file?

In a Cordova project, I have a settings.gradle file that looks like this:

// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"

However, manually I want to edit the file and make it look like:

// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"
include 'manager-A'
project(':manager-A').projectDir = new File('libs/Manager-A')
include 'manager-B'
project(':manager-B').projectDir = new File('libs/Manager-B')

The above script looks good and can be successfully built using Android studio. However, when I try to execute the command line: corova build android, it cannot be built.

Error: "Manager-A" and "Manager-B", which I manually enabled earlier, cannot be found on the command line. After checking, it turned out that the file that I edited manually was generated and became:

// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"

I would like to ask if it is possible to manually edit the file, and which can be built, as I explained above, using the command line: corova build android.

Any input is really appreciated!

+1
3

, npm cordova-blinkup-plugin . :
 1. ////android/cordova/lib/build.js
 2. fs.writeFileSync() ( 273):

// Write the settings.gradle file.
fs.writeFileSync(path.join(projectPath, 'settings.gradle'),
'// GENERATED FILE - DO NOT EDIT\n' +
'include ":"\n' + settingsGradlePaths.join('') +
'include ":customProject1" +
'include ":customProject2"');

, .

, . /path/to/project/platforms/android/cordova/lib/builders/GradleBuilder.js

+3

include setting.gradle.

project.properties :

target=android-22
android.library.reference.1=CordovaLib
android.library.reference.2=manager-A
android.library.reference.3=manager-B

cordova build android. setting.gradle.

, . libs, , - :

project(':manager-A').projectDir = new File('libs/Manager-A')

build.js( Sopheak Mongkul). , , .

0

@ankibalyan: path/to/project/platform/android/cordova/lib/builders/GradleBuilder.js, , - :)

0

All Articles