From 69ab6a0e0d70e56c6fe0fe7529a211c51df09ab7 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Tue, 18 Apr 2017 14:29:02 -0700 Subject: [PATCH] Changing the project to add the app directory as a dependency --- .../cordova/lib/builders/StudioBuilder.js | 6 +----- bin/templates/project/project.properties | 20 +++++++++---------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/bin/templates/cordova/lib/builders/StudioBuilder.js b/bin/templates/cordova/lib/builders/StudioBuilder.js index 2d3e3e51..658876a9 100644 --- a/bin/templates/cordova/lib/builders/StudioBuilder.js +++ b/bin/templates/cordova/lib/builders/StudioBuilder.js @@ -149,13 +149,9 @@ StudioBuilder.prototype.prepBuildFiles = function() { }); - // We really shouldn't do this. - // Write the settings.gradle file. - /* - fs.writeFileSync(path.join(this.root, 'settings.gradle'), + fs.writeFileSync(path.join(this.root, 'settings.gradle'), '// GENERATED FILE - DO NOT EDIT\n' + 'include ":"\n' + settingsGradlePaths.join('')); - */ // Update dependencies within build.gradle. var buildGradle = fs.readFileSync(path.join(this.root, 'build.gradle'), 'utf8'); diff --git a/bin/templates/project/project.properties b/bin/templates/project/project.properties index ddd3a060..6ea5ac23 100644 --- a/bin/templates/project/project.properties +++ b/bin/templates/project/project.properties @@ -1,15 +1,13 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt +# This file was originally created by the Android Tools, but is now +# used by cordova-android to manage the state of the various third party +# libraries used in your application +# This is the Library Module that contains the Cordova Library, this is not +# required when using an AAR android.library.reference.1=CordovaLib + +# This is the application project. This is only required for Android Studio Gradle projects +android.library.reference.2=app + # Project target. target=This_gets_replaced