Skip to content

Commit

Permalink
Merge pull request #404 from bitmovin/upgrade_react_native
Browse files Browse the repository at this point in the history
Update react native to 0.73.4
  • Loading branch information
matamegger authored Mar 5, 2024
2 parents 912f40d + 4dc5859 commit 56e5dc1
Show file tree
Hide file tree
Showing 48 changed files with 4,326 additions and 3,003 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Set up Gradle cache
uses: gradle/gradle-build-action@v2
Expand All @@ -62,15 +62,15 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Install node_modules
run: yarn install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-ios-tvos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand All @@ -75,7 +75,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand All @@ -101,7 +101,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-sdk-update-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
if: ${{ inputs.sdk_name == 'ios' }}
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/finish-release-train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/start-release-train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup node and npm registry
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [Unreleased]

### Changed

- React Native version to `0.73.4`

## [0.17.0] (2024-01-26)

### Added
Expand Down
9 changes: 5 additions & 4 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
android.useAndroidX=true
BitmovinPlayerReactNative_kotlinVersion=1.9.21
BitmovinPlayerReactNative_minSdkVersion=21
BitmovinPlayerReactNative_targetSdkVersion=33
BitmovinPlayerReactNative_compileSdkVersion=33
BitmovinPlayerReactNative_ndkversion=21.4.7075529
BitmovinPlayerReactNative_androidToolsVersion=7.4.2
BitmovinPlayerReactNative_targetSdkVersion=34
BitmovinPlayerReactNative_compileSdkVersion=34
BitmovinPlayerReactNative_buildToolsVersion=34.0.0
BitmovinPlayerReactNative_ndkversion=25.1.8937393
BitmovinPlayerReactNative_androidToolsVersion=8.1.0
BitmovinPlayerReactNative_ktlintVersion=11.6.0
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['@react-native/babel-preset'],
};
8 changes: 2 additions & 6 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

/**
Expand Down Expand Up @@ -71,6 +72,7 @@ def jscFlavor = 'org.webkit:android-jsc:+'
android {
ndkVersion rootProject.ext.ndkVersion

buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion rootProject.ext.compileSdkVersion

namespace "com.bitmovin.player.reactnative.example"
Expand Down Expand Up @@ -110,12 +112,6 @@ dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.bitmovin.player.reactnative.example

import android.os.Bundle
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate
import com.google.android.gms.cast.framework.CastContext
import android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON

class MainActivity : ReactActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(null)
try {
// Load Google Cast context eagerly in order to ensure that
// the cast state is updated correctly.
CastContext.getSharedInstance(this, Runnable::run)
} catch (e: Exception) {
// cast framework not supported
}

// Prevent going into ambient mode on Android TV devices / screen timeout on mobile devices during playback.
// If your app uses multiple activities make sure to add this flag to the activity that hosts the player.
// Reference: https://developer.android.com/training/scheduling/wakelock#screen
getWindow().addFlags(FLAG_KEEP_SCREEN_ON)
}

/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "BitmovinPlayerReactNativeExample"

/**
* Returns the instance of the [ReactActivityDelegate]. Here we use a util class [ ] which allows you to easily enable Fabric and Concurrent React
* (aka React 18) with two boolean flags.
*/
override fun createReactActivityDelegate() = DefaultReactActivityDelegate(
this,
mainComponentName, // If you opted-in for the New Architecture, we enable the Fabric Renderer.
fabricEnabled,
)
}
Loading

0 comments on commit 56e5dc1

Please sign in to comment.