I created a Cordoba application with user 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 the 'cordova build android' command, the settings.gradle file is automatically generated to the default value, which looks like this:
// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"
As a result, the build was always unsuccessful due to the inability to find the 'manager' module, which I defined in settings.gradle.
I wonder if there is a way to prevent the build command from being collected from the duplicate user settings.gradle file.
source
share