Skip to content

Commit

Permalink
Merge pull request TheWidlarzGroup#1690 from 24i/feature/androidx-che…
Browse files Browse the repository at this point in the history
…rry-pick

[FIX] Fix release 5.0.0 bad merge with 5.0.1
  • Loading branch information
CHaNGeTe authored Sep 8, 2019
2 parents c29244b + c38ff02 commit d858bf7
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 12 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Changelog

### Version 5.0.0
### Version 5.0.1
* Fix AndroidX Support bad merge

### Version 5.0.0 [Deprecated]
* AndroidX Support

### Version 4.4.4
Expand Down
57 changes: 50 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
A `<Video>` component for react-native, as seen in
[react-native-login](https://github.com/brentvatne/react-native-login)!

Version 5.x recommends react-native >= 0.60.0 for Android 64bit builds and Android X support.

Version 4.x requires react-native >= 0.57.0

Version 3.x requires react-native >= 0.40.0

### Version 5.0.0 breaking changes

Version 5 introduces breaking changes on Android, please check carefully the steps described there: [Android Installation](#Android-installation)

### Version 4.0.0 breaking changes
Version 4.0.0 changes some behaviors and may require updates to your Gradle files. See [Updating](#updating) for details.

Expand All @@ -20,6 +26,11 @@ Version 3.0 features a number of changes to existing behavior. See [Updating](#u
## Table of Contents

* [Installation](#installation)
* [iOS](#ios-installation)
* [tvOS](#tvos-installation)
* [Android](#android-installation)
* [Windows](#windows-installation)
* [react-native-dom](#react-native-dom-installation)
* [Usage](#usage)
* [iOS App Transport Security](#ios-app-transport-security)
* [Audio Mixing](#audio-mixing)
Expand All @@ -42,7 +53,7 @@ yarn add react-native-video

Then follow the instructions for your platform to link react-native-video into your project:

### iOS
### iOS installation
<details>
<summary>iOS details</summary>

Expand Down Expand Up @@ -74,7 +85,7 @@ end

</details>

### tvOS
### tvOS installation
<details>
<summary>tvOS details</summary>

Expand All @@ -97,7 +108,7 @@ Select RCTVideo-tvOS
<img src="./docs/tvOS-step-4.jpg" width="40%">
</details>

### Android
### Android installation
<details>
<summary>Android details</summary>

Expand All @@ -121,7 +132,6 @@ include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
```


#### **android/app/build.gradle**

From version >= 5.0.0, you have to apply this changes:
Expand All @@ -130,7 +140,8 @@ From version >= 5.0.0, you have to apply this changes:
dependencies {
...
compile project(':react-native-video')
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
+ implementation "androidx.appcompat:appcompat:1.0.0"
- implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"

}
```
Expand Down Expand Up @@ -165,7 +176,7 @@ protected List<ReactPackage> getPackages() {
```
</details>

### Windows
### Windows installation
<details>
<summary>Windows details</summary>

Expand Down Expand Up @@ -215,7 +226,7 @@ using System.Collections.Generic;
```
</details>

### react-native-dom
### react-native-dom installation
<details>
<summary>react-native-dom details</summary>

Expand Down Expand Up @@ -1286,6 +1297,38 @@ To enable audio to play in background on iOS the audio session needs to be set t

## Updating

### Version 5.0.0

Probably you want to update your gradle version:
#### gradle-wrapper.properties
```diff
- distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
```

#### **android/app/build.gradle**

From version >= 5.0.0, you have to apply this changes:

```diff
dependencies {
...
compile project(':react-native-video')
+ implementation "androidx.appcompat:appcompat:1.0.0"
- implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
}
```

#### **android/gradle.properties**

Migrating to AndroidX (needs version >= 5.0.0):

```gradle.properties
android.useAndroidX=true
android.enableJetifier=true
```

### Version 4.0.0

#### Gradle 3 and target SDK 26 requirement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.annotation.TargetApi;
import android.content.Context;
import android.support.v4.content.ContextCompat;
import androidx.core.content.ContextCompat;
import android.util.AttributeSet;
import android.util.Log;
import android.view.Gravity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.brentvatne.exoplayer;

import android.support.annotation.IntDef;
import androidx.annotation.IntDef;

import java.lang.annotation.Retention;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.brentvatne.exoplayer;

import android.support.annotation.StringDef;
import androidx.annotation.StringDef;
import android.view.View;

import com.facebook.react.bridge.Arguments;
Expand Down
1 change: 1 addition & 0 deletions examples/basic/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ android {
release {
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
matchingFallbacks = ['release', 'debug']
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
Expand Down
2 changes: 2 additions & 0 deletions examples/basic/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
# org.gradle.parallel=true

android.useDeprecatedNdk=true
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-video",
"version": "5.0.0",
"version": "5.0.1",
"description": "A <Video /> element for react-native",
"main": "Video.js",
"license": "MIT",
Expand Down

0 comments on commit d858bf7

Please sign in to comment.