Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Android build fails because it suddenly can't find com.google.gms:goo…
Browse files Browse the repository at this point in the history
…gle-services:4.2.0 #1072
  • Loading branch information
EddyVerbruggen committed Dec 10, 2018
1 parent 75ad999 commit 6b3ae8b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
- [Firebase iOS SDK Changelog](https://firebase.google.com/support/release-notes/ios)
- [Firebase Android SDK Changelog](https://firebase.google.com/support/release-notes/android)

## 7.4.5 (2018, December 10)
[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/86?closed=1)


## 7.4.4 (2018, December 8)
[Fixes & Enhancements](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/milestone/85?closed=1)

Expand Down
9 changes: 8 additions & 1 deletion publish/scripts/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ module.exports = function($logger, $projectData) {
let repositoriesNode = buildGradleContent.indexOf("repositories", 0);
if (repositoriesNode > -1) {
repositoriesNode = buildGradleContent.indexOf("}", repositoriesNode);
buildGradleContent = buildGradleContent.substr(0, repositoriesNode - 1) + ' maven { url "https://maven.fabric.io/public" }\\n' + buildGradleContent.substr(repositoriesNode - 1);
buildGradleContent = buildGradleContent.substr(0, repositoriesNode - 1) + '\\t\\tmaven { url "https://maven.fabric.io/public" }\\n\\t\\tmaven { url "https://dl.bintray.com/android/android-tools" }\\n' + buildGradleContent.substr(repositoriesNode - 1);
}
let dependenciesNode = buildGradleContent.indexOf("dependencies", 0);
Expand All @@ -1011,6 +1011,13 @@ module.exports = function($logger, $projectData) {
// see https://docs.fabric.io/android/changelog.html
buildGradleContent = buildGradleContent.substr(0, dependenciesNode - 1) + ' classpath "io.fabric.tools:gradle:1.26.1"\\n' + buildGradleContent.substr(dependenciesNode - 1);
}
} else if (buildGradleContent.indexOf("https://dl.bintray.com/android/android-tools") === -1) {
let repositoriesNode = buildGradleContent.indexOf("repositories", 0);
if (repositoriesNode > -1) {
repositoriesNode = buildGradleContent.indexOf("}", repositoriesNode);
buildGradleContent = buildGradleContent.substr(0, repositoriesNode - 1) + '\\t\\tmaven { url "https://dl.bintray.com/android/android-tools" }\\n' + buildGradleContent.substr(repositoriesNode - 1);
}
}
let gradlePattern = /classpath ('|")com\\.android\\.tools\\.build:gradle:\\d+\\.\\d+\\.\\d+('|")/;
Expand Down
9 changes: 8 additions & 1 deletion src/scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -3800,7 +3800,7 @@ module.exports = function($logger, $projectData) {
let repositoriesNode = buildGradleContent.indexOf("repositories", 0);
if (repositoriesNode > -1) {
repositoriesNode = buildGradleContent.indexOf("}", repositoriesNode);
buildGradleContent = buildGradleContent.substr(0, repositoriesNode - 1) + ' maven { url "https://maven.fabric.io/public" }\\n' + buildGradleContent.substr(repositoriesNode - 1);
buildGradleContent = buildGradleContent.substr(0, repositoriesNode - 1) + '\\t\\tmaven { url "https://maven.fabric.io/public" }\\n\\t\\tmaven { url "https://dl.bintray.com/android/android-tools" }\\n' + buildGradleContent.substr(repositoriesNode - 1);
}
let dependenciesNode = buildGradleContent.indexOf("dependencies", 0);
Expand All @@ -3809,6 +3809,13 @@ module.exports = function($logger, $projectData) {
// see https://docs.fabric.io/android/changelog.html
buildGradleContent = buildGradleContent.substr(0, dependenciesNode - 1) + ' classpath "io.fabric.tools:gradle:1.26.1"\\n' + buildGradleContent.substr(dependenciesNode - 1);
}
} else if (buildGradleContent.indexOf("https://dl.bintray.com/android/android-tools") === -1) {
let repositoriesNode = buildGradleContent.indexOf("repositories", 0);
if (repositoriesNode > -1) {
repositoriesNode = buildGradleContent.indexOf("}", repositoriesNode);
buildGradleContent = buildGradleContent.substr(0, repositoriesNode - 1) + '\\t\\tmaven { url "https://dl.bintray.com/android/android-tools" }\\n' + buildGradleContent.substr(repositoriesNode - 1);
}
}
let gradlePattern = /classpath ('|")com\\.android\\.tools\\.build:gradle:\\d+\\.\\d+\\.\\d+('|")/;
Expand Down

0 comments on commit 6b3ae8b

Please sign in to comment.