Only add google to build.grade if it is missing.#894
Only add google to build.grade if it is missing.#894brendoncoin wants to merge 1 commit intoarnesson:masterfrom
Conversation
briantq
left a comment
There was a problem hiding this comment.
For consistency, we should do the same checks for the Fabric repo too.
| var googlesMavenRepo = whitespace + 'google() // Google\'s Maven repository from cordova-plugin-firebase'; | ||
| // Only add Google's Maven repo if it's not already there | ||
| var googleRepoAlreadyExists = buildGradle.test(/(google\(\))|(https:\/\/maven\.google\.com)/m); | ||
| if (googleRepoAlreadyExists) { |
There was a problem hiding this comment.
Instead of setting the variable twice, along with running regex and string replacement, why don't we wrap the change to only run the code if !googleRepoAlreadyExists? This will reduce code complexity and improve performance.
|
@brendoncoin I am in support of your approach, but want to make sure we simplify the code/improve build performance along with being consistent with Fabric. Additionally, there are some tests failing on the specific lines you modified (referencing the test method). Could you take a look as we need to get those passing before we merge the code. |
|
@brendoncoin if you would like to get this merged please address the comments and check the build failure. I am happy to answer any questions as I definitely enjoy merging code more so than closing inactive pull requests. |
For fixing issue #893.