mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
CB-11083: The GradleBuidler can tell the difference between a Cordova Plugin Framework and a regular framework based on the name
This commit is contained in:
parent
2f3c71feaa
commit
c05521e55a
@ -101,10 +101,20 @@ GradleBuilder.prototype.prepBuildFiles = function() {
|
|||||||
// Update dependencies within build.gradle.
|
// Update dependencies within build.gradle.
|
||||||
var buildGradle = fs.readFileSync(path.join(this.root, 'build.gradle'), 'utf8');
|
var buildGradle = fs.readFileSync(path.join(this.root, 'build.gradle'), 'utf8');
|
||||||
var depsList = '';
|
var depsList = '';
|
||||||
|
var insertExclude = function(libName) {
|
||||||
|
if(libName.indexOf("cordova-plugin") != -1) {
|
||||||
|
depsList += '{\n exclude module:("CordovaLib")\n }\n';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
depsList += "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
subProjects.forEach(function(p) {
|
subProjects.forEach(function(p) {
|
||||||
var libName=p.replace(/[/\\]/g, ':').replace(name+'-','');
|
var libName=p.replace(/[/\\]/g, ':').replace(name+'-','');
|
||||||
depsList += ' debugCompile project(path: "' + libName + '", configuration: "debug")\n';
|
depsList += ' debugCompile(project(path: "' + libName + '", configuration: "debug"))';
|
||||||
depsList += ' releaseCompile project(path: "' + libName + '", configuration: "release")\n';
|
insertExclude(libName);
|
||||||
|
depsList += ' releaseCompile(project(path: "' + libName + '", configuration: "release"))';
|
||||||
|
insertExclude(libName);
|
||||||
});
|
});
|
||||||
// For why we do this mapping: https://issues.apache.org/jira/browse/CB-8390
|
// For why we do this mapping: https://issues.apache.org/jira/browse/CB-8390
|
||||||
var SYSTEM_LIBRARY_MAPPINGS = [
|
var SYSTEM_LIBRARY_MAPPINGS = [
|
||||||
|
Loading…
Reference in New Issue
Block a user