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

Commit 3011d5f

Browse files
Build failed on tns run android #171
1 parent 40e4818 commit 3011d5f

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ We're trying to automate these steps, but for now:
6262
apply plugin: "com.google.gms.google-services"
6363
```
6464

65+
#### Google Play Services Version
66+
The plugin will default to version 9.6.0+ of the Android `play-services-base` SDK.
67+
If you need to change the version (to for instance the latest version), you can add a project ext property `googlePlayServicesVersion` like so:
68+
69+
```
70+
// /app/App_Resources/Android/app.gradle
71+
72+
project.ext {
73+
googlePlayServicesVersion = "+"
74+
}
75+
```
76+
6577
## Usage
6678

6779
If you want a quickstart, [clone our demo app](https://github.com/EddyVerbruggen/nativescript-plugin-firebase-demo).

platforms/android/include.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ dependencies {
2020
compile "com.google.firebase:firebase-crash:9.6.+"
2121

2222
// for reading google-services.json and configuration
23-
compile "com.google.android.gms:play-services-base:9.6.+"
23+
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : '9.6.+'
24+
compile "com.google.android.gms:play-services-base:$googlePlayServicesVersion"
2425

2526
// Uncomment if you want to use 'Remote Config'
2627
// compile "com.google.firebase:firebase-config:9.6.+"

scripts/postinstall.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ function writeGradleFile(result) {
161161
compile "com.google.firebase:firebase-crash:9.6.+"
162162
163163
// for reading google-services.json and configuration
164-
compile "com.google.android.gms:play-services-base:9.6.+"
164+
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : '9.6.+'
165+
compile "com.google.android.gms:play-services-base:$googlePlayServicesVersion"
165166
166167
// Uncomment if you want to use 'Remote Config'
167168
` + (isSelected(result.remote_config) ? `` : `//`) + ` compile "com.google.firebase:firebase-config:9.6.+"

0 commit comments

Comments
 (0)