I have created a Cordova App with a custom settings.gradle as folows:
// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"
include 'manager'
project(':manager').projectDir = new File('libs/ConnectManager')
and in build.gradle, I can refer to it as:
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile project(path: "CordovaLib", configuration: "debug")
releaseCompile project(path: "CordovaLib", configuration: "release")
// SUB-PROJECT DEPENDENCIES END
compile project(':manager')
}
However, when I execute command 'cordova build android', the file settings.gradle is auto-generated to a default setting which looks like:
// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"
As a result, build always failed due to unable to locate module 'manager' that I have defined in settings.gradle.
I wonder if there is any way to prevent build command from duplicating a custom settings.gradle file.