Skip to content

Commit

Permalink
feat: Google play services versioning (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingbin authored and machour committed Feb 22, 2018
1 parent d238de6 commit c9b2a47
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,8 @@

### next

* Add Gradle build config that allows a consumer to set Play Services Version from a root-project ext variable.

### 0.15.3

* Fix crash on iOS: prevent insertion of nil values in the dictionary (https://github.com/rebeccahughes/react-native-device-info/pull/328)
Expand Down
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -81,6 +81,17 @@ Run your project (Cmd+R)
<details>
<summary>Android</summary>

* **_optional_** in `android/build.gradle`:

```gradle
...
ext {
// dependency versions
googlePlayServicesVersion = "<Your Services Version>"
}
...
```

* in `android/app/build.gradle`:

```diff
Expand Down
4 changes: 3 additions & 1 deletion android/build.gradle
Expand Up @@ -19,6 +19,8 @@ android {
}

dependencies {
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : "+"

compile 'com.facebook.react:react-native:+'
compile 'com.google.android.gms:play-services-gcm:+'
compile "com.google.android.gms:play-services-gcm:$googlePlayServicesVersion"
}

0 comments on commit c9b2a47

Please sign in to comment.