Skip to content

Commit

Permalink
Merge pull request #571 from jpush/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JoshLipan authored Nov 29, 2018
2 parents 9041c5f + 0ebd976 commit ec148be
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 33 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ android {
}
...
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
   compile project(':jpush-react-native') // 添加 jpush 依赖
   compile project(':jcore-react-native') // 添加 jcore 依赖
   compile "com.facebook.react:react-native:+" // From node_modules
implementation fileTree(dir: "libs", include: ["*.jar"])
  implementation project(':jpush-react-native') // 添加 jpush 依赖
  implementation project(':jcore-react-native') // 添加 jcore 依赖
  implementation "com.facebook.react:react-native:+" // From node_modules
}
```

Expand Down
8 changes: 4 additions & 4 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ android {
}
...
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
   compile project(':jpush-react-native') // add jpush dependency
   compile project(':jcore-react-native') // add jcore dependency
   compile "com.facebook.react:react-native:+" // From node_modules
implementation fileTree(dir: "libs", include: ["*.jar"])
  implementation project(':jpush-react-native') // add jpush dependency
  implementation project(':jcore-react-native') // add jcore dependency
  implementation "com.facebook.react:react-native:+" // From node_modules
}
```

Expand Down
16 changes: 10 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
apply plugin: 'com.android.library'

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

android {
compileSdkVersion 27
buildToolsVersion '26.0.2'
compileSdkVersion safeExtGet('compileSdkVersion', 27)
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.2')

defaultConfig {
minSdkVersion 16
targetSdkVersion 27
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 27)
versionCode 1
versionName "1.0"
}
Expand All @@ -24,6 +28,6 @@ repositories {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:+'
api fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.facebook.react:react-native:+'
}
8 changes: 4 additions & 4 deletions documents/check.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
```
...
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
   compile project(':jpush-react-native') // 添加 jpush 依赖
   compile project(':jcore-react-native') // 添加 jcore 依赖
   compile "com.facebook.react:react-native:+" // From node_modules
implementation fileTree(dir: "libs", include: ["*.jar"])
  implementation project(':jpush-react-native') // 添加 jpush 依赖
  implementation project(':jcore-react-native') // 添加 jcore 依赖
  implementation "com.facebook.react:react-native:+" // From node_modules
}
```

Expand Down
8 changes: 4 additions & 4 deletions documents/check_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
```
...
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
   compile project(':jpush-react-native') // add jpush dependency
   compile project(':jcore-react-native') // add jcore dependency
   compile "com.facebook.react:react-native:+" // From node_modules
implementation fileTree(dir: "libs", include: ["*.jar"])
  implementation project(':jpush-react-native') // add jpush dependency
  implementation project(':jcore-react-native') // add jcore dependency
  implementation "com.facebook.react:react-native:+" // From node_modules
}
```

Expand Down
16 changes: 9 additions & 7 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,17 @@ android {
buildToolsVersion "26.0.2"

defaultConfig {
applicationId "com.pushdemo"
applicationId "com.test.josh" //替换包名:
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"

ndk {
abiFilters "armeabi-v7a", "x86"
}
manifestPlaceholders = [
JPUSH_APPKEY: "d4ee2375846bc30fa51334f5", //在此替换你的APPKey
JPUSH_APPKEY: "7b4b94cca0d185d611e53cca", //在此替换你的APPKey
APP_CHANNEL : "developer-default" //应用渠道号
]
}
Expand Down Expand Up @@ -141,11 +142,12 @@ android {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
api project(':jpush-react-native')
api project(':jcore-react-native')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.facebook.react:react-native:+'

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':jcore-react-native')
implementation project(':jpush-react-native')
implementation 'com.android.support:appcompat-v7:25.3.1'
implementation 'com.facebook.react:react-native:+'
// From node_modules
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jpush-react-native",
"version": "2.3.0",
"version": "2.4.0",
"description": "a jpush plugin for react native application",
"main": "index.js",
"scripts": {
Expand All @@ -24,7 +24,7 @@
},
"homepage": "https://github.com/jpush/jpush-react-native#readme",
"peerDependencies": {
"jcore-react-native": ">= 1.2.11"
"jcore-react-native": ">= 1.3.0"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
Expand Down
4 changes: 2 additions & 2 deletions scripts/recipes.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ project(':jpush-react-native').projectDir = new File(rootProject.projectDir, '..
{
pattern: 'dependencies {',
patch: `
compile project(':jcore-react-native')
compile project(':jpush-react-native')`
implementation project(':jcore-react-native')
implementation project(':jpush-react-native')`
},
{
pattern: `versionName .*`,
Expand Down

0 comments on commit ec148be

Please sign in to comment.