Adding the if statement to see if we can support both structures with minimal editing, TODO: actually write tests for this somehow

This commit is contained in:
Joe Bowser 2017-06-13 10:11:41 -07:00
parent 8f16df4c90
commit 33feb00e8f

View File

@ -45,7 +45,12 @@ task wrapper(type: Wrapper) {
// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.
// Refer to: http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html
ext {
apply from: '../CordovaLib/cordova.gradle'
//This is a dirty hack to support legacy projects
if (file('../CordovaLib/cordova.gradle').exists()) {
apply from: '../CordovaLib/cordova.gradle'
} else {
apply from: 'CordovaLib/cordova.gradle'
}
// The value for android.compileSdkVersion.
if (!project.hasProperty('cdvCompileSdkVersion')) {
cdvCompileSdkVersion = null;