Skip to content

Commit

Permalink
chore: make gradle compliant with RN 0.56 and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
JeandeCampredon committed Sep 5, 2018
1 parent fb59d41 commit 47e40c8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -24,15 +24,15 @@
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-referrer')
compile project(':react-native-referrer')
```
4. Insert the following lines inside the application block in `android/app/src/main/AndroidManifest.xml`:
```
<receiver android:name="com.jdc.reactlibrary.ReferrerReceiver" android:exported="true">
<intent-filter>
```xml
<receiver android:name="com.jdc.reactlibrary.ReferrerReceiver" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
</intent-filter>
</receiver>
```


Expand Down
17 changes: 9 additions & 8 deletions android/build.gradle
@@ -1,25 +1,27 @@

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

buildscript {
repositories {
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.android.tools.build:gradle:2.2.3'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion safeExtGet('compileSdkVersion', 26)
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3')

defaultConfig {
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 26)
}
lintOptions {
abortOnError false
Expand All @@ -33,4 +35,3 @@ repositories {
dependencies {
compile 'com.facebook.react:react-native:+'
}

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-referrer",
"version": "0.1.1",
"version": "0.1.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 47e40c8

Please sign in to comment.