Merge pull request #97 from proyecto26/develop
Add gradle backward-compatibility with AndroidX support
This commit is contained in:
commit
b6aaba614d
@ -22,6 +22,12 @@ in case of vulnerabilities.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [3.0.1] - 2019-08-16
|
||||
|
||||
### Added
|
||||
- Add gradle backward-compatibility for Android Support with Jetifier ([#96](https://github.com/proyecto26/react-native-inappbrowser/pull/97)).
|
||||
- Added **androidXAnnotation** and **androidXBrowser** properties from **rootProject.ext** for **AndroidX** with backward compatibility using **supportLibVersion** property instead.
|
||||
|
||||
## [3.0.0] - 2019-07-27
|
||||
### Added
|
||||
- **Android:** Migrate to AndroidX by [@jdnichollsc](https://github.com/jdnichollsc) ([8a083f2](https://github.com/proyecto26/react-native-inappbrowser/commit/8a083f24847ac5f49923c6217106628434634b4d)).
|
||||
|
||||
44
README.md
44
README.md
@ -35,11 +35,53 @@
|
||||
|
||||
### Mostly automatic installation
|
||||
|
||||
#### Using React Native >= 0.60
|
||||
Linking the package manually is not required anymore with [Autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).
|
||||
|
||||
- **iOS Platform:**
|
||||
|
||||
`$ cd ios && pod install && cd ..` # CocoaPods on iOS needs this extra step
|
||||
|
||||
- **Android Platform for Android Support:**
|
||||
|
||||
Using [Jetifier tool](https://github.com/mikehardy/jetifier) for backward-compatibility.
|
||||
|
||||
Modify your **android/build.gradle** configuration:
|
||||
```
|
||||
buildscript {
|
||||
ext {
|
||||
buildToolsVersion = "28.0.3"
|
||||
minSdkVersion = 16
|
||||
compileSdkVersion = 28
|
||||
targetSdkVersion = 28
|
||||
# Only using Android Support libraries
|
||||
supportLibVersion = "28.0.0"
|
||||
}
|
||||
```
|
||||
|
||||
- **Android Platform for AndroidX:**
|
||||
|
||||
Modify your **android/build.gradle** configuration:
|
||||
```
|
||||
buildscript {
|
||||
ext {
|
||||
buildToolsVersion = "28.0.3"
|
||||
minSdkVersion = 16
|
||||
compileSdkVersion = 28
|
||||
targetSdkVersion = 28
|
||||
# Remove 'supportLibVersion' property and put specific versions for AndroidX libraries
|
||||
androidXAnnotation = "1.1.0"
|
||||
androidXBrowser = "1.0.0"
|
||||
// Put here other AndroidX dependencies
|
||||
}
|
||||
```
|
||||
|
||||
#### Using React Native < 0.60
|
||||
|
||||
`$ react-native link react-native-inappbrowser-reborn`
|
||||
|
||||
### Manual installation
|
||||
|
||||
|
||||
#### iOS
|
||||
|
||||
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
|
||||
|
||||
@ -42,8 +42,21 @@ repositories {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'com.facebook.react:react-native:+'
|
||||
implementation 'androidx.annotation:annotation:1.+'
|
||||
implementation 'androidx.browser:browser:1.+'
|
||||
implementation 'org.greenrobot:eventbus:3.+'
|
||||
def supportLibVersion = safeExtGet('supportLibVersion', safeExtGet('supportVersion', null))
|
||||
def androidXVersion = safeExtGet('androidXVersion', null)
|
||||
if (supportLibVersion && androidXVersion == null) {
|
||||
implementation "com.android.support:support-annotations:$supportLibVersion"
|
||||
implementation "com.android.support:customtabs:$supportLibVersion"
|
||||
} else {
|
||||
def defaultAndroidXVersion = "1.+"
|
||||
if (androidXVersion == null) {
|
||||
androidXVersion = defaultAndroidXVersion
|
||||
}
|
||||
def androidXAnnotation = safeExtGet('androidXAnnotation', androidXVersion)
|
||||
def androidXBrowser = safeExtGet('androidXBrowser', androidXVersion)
|
||||
implementation "androidx.annotation:annotation:$androidXAnnotation"
|
||||
implementation "androidx.browser:browser:$androidXBrowser"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,9 @@ buildscript {
|
||||
minSdkVersion = 16
|
||||
compileSdkVersion = 28
|
||||
targetSdkVersion = 28
|
||||
supportLibVersion = "28.0.0"
|
||||
androidXVersion = "1.+" // Default AndroidX dependency
|
||||
androidXAnnotation = "1.1.0"
|
||||
androidXBrowser = "1.0.0"
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
|
||||
7
package-lock.json
generated
7
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-inappbrowser-reborn",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -1525,6 +1525,11 @@
|
||||
"mimic-fn": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"opencollective-postinstall": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
|
||||
"integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw=="
|
||||
},
|
||||
"optionator": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-inappbrowser-reborn",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "InAppBrowser for React Native",
|
||||
"main": "index.js",
|
||||
"readmeFilename": "README.md",
|
||||
@ -45,4 +45,4 @@
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/proyecto26"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user