Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to RN 73 #1349

Merged
merged 51 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3541ac6
feat: update gradle
Marius456 Jan 19, 2024
1f4167e
fix/build.gradle
ElenaDiachenko Jan 19, 2024
6ff1602
change to kotlin files
Marius456 Jan 19, 2024
28ce5b2
feat: change kotlin parser
Marius456 Jan 19, 2024
b0616ed
update RN dependencies
Marius456 Jan 21, 2024
1f669c2
update AndroidManifest for RN 0.73
Marius456 Jan 22, 2024
098397f
update_react-native-gesture-handler_and_bring_back_default_settings
ElenaDiachenko Jan 23, 2024
de1e4a9
update kotlin files
Marius456 Jan 23, 2024
989a4a3
bring_back_androidManifest_injection
ElenaDiachenko Jan 24, 2024
cd21b36
fix app name
ElenaDiachenko Jan 25, 2024
b77a0ca
Merge branch 'feat/upgrade_to_rn73' into fix/update_react-native-gest…
ElenaDiachenko Jan 25, 2024
86fa250
Merge pull request #1360 from flexn-io/fix/update_react-native-gestur…
Marius456 Jan 25, 2024
88474f0
feat: update kotlin files
Marius456 Jan 26, 2024
7d08bdd
fix/androidwear
ElenaDiachenko Jan 26, 2024
78a0a34
fix: androidwear white screen
Marius456 Jan 27, 2024
cad1f4b
updated dependencies
Marius456 Jan 28, 2024
13e5bb9
delete flipper
Marius456 Jan 30, 2024
105cb55
update ios dependencies
Marius456 Jan 31, 2024
fd44d48
forced main-activity arg for react-native cli since it was defaulting…
mihaiblaga89 Jan 31, 2024
2dd8374
add kotlin injections for android
ElenaDiachenko Jan 31, 2024
e192c6b
splash activity for androidtv
mihaiblaga89 Jan 31, 2024
ce70220
added androidtv and firetv splashscreens, conditional for wear
mihaiblaga89 Jan 31, 2024
5c5512e
update ios podfiles
Marius456 Feb 1, 2024
3607580
remove hermes from tvos
Marius456 Feb 1, 2024
e34bfb3
proprerty renamed to forceLinking
ElenaDiachenko Feb 1, 2024
c06d59a
removed unnecessary files
ElenaDiachenko Feb 1, 2024
ffa0b03
fix tvos build
Marius456 Feb 1, 2024
518fbaf
Merge branch 'feat/upgrade_to_rn73' into feat/android_back_kotlin
ElenaDiachenko Feb 2, 2024
23cece6
remove unnecessary file, update forceLinking description
ElenaDiachenko Feb 2, 2024
d84574e
updated dependencies
Marius456 Feb 4, 2024
878bcda
Merge branch 'feat/upgrade_to_rn73' into feat/android_back_kotlin
ElenaDiachenko Feb 5, 2024
e353259
add kotlin injections - androidwear
ElenaDiachenko Feb 5, 2024
6a43872
Merge pull request #1369 from flexn-io/feat/android_back_kotlin
mihaiblaga89 Feb 5, 2024
428ce09
add kotlin injections - androidtv
ElenaDiachenko Feb 5, 2024
66b67b4
Merge branch 'release/1.0' into feat/upgrade_to_rn73
Marius456 Feb 6, 2024
8ecff60
Merge branch 'feat/upgrade_to_rn73' of https://github.com/flexn-io/re…
Marius456 Feb 6, 2024
bfb4978
delete javaparser
Marius456 Feb 6, 2024
607cf50
update import + bring back test case
ElenaDiachenko Feb 6, 2024
38c4e93
update react native to 0.73.4
Marius456 Feb 6, 2024
6364615
updated dependencies
Marius456 Feb 6, 2024
fe8aae0
Merge branch 'release/1.0' of github.com:pavjacko/renative into feat/…
mihaiblaga89 Feb 6, 2024
a15bf6d
proper injections, add back hermes config
mihaiblaga89 Feb 6, 2024
958df27
allow androidtv backup
mihaiblaga89 Feb 6, 2024
425680d
rename test module
ElenaDiachenko Feb 7, 2024
9acd9b0
remove no-packager from android build
mihaiblaga89 Feb 7, 2024
f62b496
Merge branch 'feat/upgrade_to_rn73' of github.com:pavjacko/renative i…
mihaiblaga89 Feb 7, 2024
57e42ea
remove assetSources for ios
ElenaDiachenko Feb 7, 2024
199a432
remove hardcoded packageID
mihaiblaga89 Feb 7, 2024
6c45f8c
added required env variables to xcodebuild
mihaiblaga89 Feb 7, 2024
d5fe6ba
update next, set node_env to prod, exclude rn_modules from ts
mihaiblaga89 Feb 8, 2024
ec37194
added rn_modules exclusion for template-starter
mihaiblaga89 Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: ['module:@react-native/babel-preset'],
};
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,19 @@
"@types/tar": "6.1.5",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"babel-jest": "29.2.1",
"babel-jest": "29.6.3",
"babel-plugin-module-resolver": "^5.0.0",
"deepmerge": "3.2.0",
"eslint": "8.19.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-react": "7.33.2",
"husky": "^7.0.0",
"jest": "29.2.1",
"jest": "^29.6.3",
"jest-environment-jsdom": "29.7.0",
"lerna": "^6.6.2",
"lint-staged": "12.3.4",
"madge": "6.1.0",
"prettier": "2.3.1",
"prettier": "2.8.8",
"rimraf": "5.0.5",
"ts-jest": "^27.0.7",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-harness/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

gem 'cocoapods', '~> 1.12', '< 1.15'
gem 'cocoapods', '~> 1.13', '< 1.15'
gem 'activesupport', '~> 7.0', '<= 7.0.8'
gem 'cocoapods-user-defined-build-types'

2 changes: 1 addition & 1 deletion packages/app-harness/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ PLATFORMS

DEPENDENCIES
activesupport (~> 7.0, <= 7.0.8)
cocoapods (~> 1.12, < 1.15)
cocoapods (~> 1.13, < 1.15)
cocoapods-user-defined-build-types

RUBY VERSION
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package {{APPLICATION_ID}}

import android.view.View
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ReactShadowNode
import com.facebook.react.uimanager.ViewManager

class MyAppPackage : ReactPackage {

override fun createViewManagers(
reactContext: ReactApplicationContext
): MutableList<ViewManager<View, ReactShadowNode<*>>> = mutableListOf()

override fun createNativeModules(
reactContext: ReactApplicationContext
): MutableList<NativeModule> = listOf(TestNativeModule(reactContext)).toMutableList()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package {{APPLICATION_ID}}

import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReactMethod
import com.facebook.react.bridge.Callback


class TestNativeModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
override fun getName() = "TestNativeModule"

@ReactMethod
fun createTestEvent(name: String, location: String, callback:Callback) {
var result = "Event called with name: $name and location: $location"
callback.invoke(null, result)
}

}
15 changes: 8 additions & 7 deletions packages/app-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,19 @@
"@lightningjs/sdk": "^5.4.1",
"@react-native-firebase/app": "18.6.1",
"@rnv/renative": "1.0.0-rc.11",
"next": "14.0.4",
"next": "14.1.0",
"raf": "3.4.1",
"react": "18.2.0",
"react-art": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.4",
"react-native": "0.73.4",
"react-native-carplay": "2.3.0",
"react-native-gesture-handler": "2.13.1",
"react-native-gesture-handler": "2.14.1",
"react-native-permissions": "3.10.1",
"react-native-photo-editor": "1.0.13",
"react-native-splash-screen": "3.3.0",
"react-native-tvos": "0.72.4-0",
"react-native-orientation-locker": "1.5.0",
"react-native-tvos": "0.73.1-3",
"react-native-web": "0.19.9"
},
"devDependencies": {
Expand All @@ -67,10 +68,10 @@
"@rnv/engine-rn-tvos": "1.0.0-rc.11",
"@rnv/engine-rn-web": "1.0.0-rc.11",
"@rnv/template-starter": "1.0.0-rc.11",
"@types/react": "18.2.22",
"@types/react-dom": "18.2.7",
"@types/react": "18.2.52",
"@types/react-dom": "18.2.18",
"@types/react-native": "0.72.2",
"babel-jest": "29.2.1",
"babel-jest": "29.6.3",
"babel-loader": "9.1.3",
"detox": "18.20.2",
"jetifier": "2.0.0",
Expand Down
49 changes: 20 additions & 29 deletions packages/app-harness/renative.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,19 @@
"android": {
"templateAndroid": {
"MainActivity_java": {
"createMethods": [
"SplashScreen.show(this)"
],
"imports": [
"org.devio.rn.splashscreen.SplashScreen"
]
"createMethods": ["SplashScreen.show(this)"],
"imports": ["org.devio.rn.splashscreen.SplashScreen"]
}
},
"package": "org.devio.rn.splashscreen.SplashScreenReactPackage"
},
"ios": {
"templateXcode": {
"AppDelegate_mm": {
"appDelegateImports": [
"RNSplashScreen.h"
],
"appDelegateImports": ["RNSplashScreen.h"],
"appDelegateMethods": {
"application": {
"didFinishLaunchingWithOptions": [
"[RNSplashScreen show]"
]
"didFinishLaunchingWithOptions": ["[RNSplashScreen show]"]
}
}
}
Expand All @@ -42,30 +34,31 @@
},
"version": "3.3.0"
},
"TestNativeModule": {
"android": {
"templateAndroid": {
"MainApplication_java": {
"packages": ["MyAppPackage"]
}
},
"forceLinking": true
}
},
"react-native-carplay": {
"ios": {
"templateXcode": {
"AppDelegate_h": {
"appDelegateImports": [
"CarPlay/CarPlay.h"
],
"appDelegateExtensions": [
"UIApplicationDelegate",
"CPApplicationDelegate"
]
"appDelegateImports": ["CarPlay/CarPlay.h"],
"appDelegateExtensions": ["UIApplicationDelegate", "CPApplicationDelegate"]
},
"AppDelegate_mm": {
"appDelegateImports": [
"RNCarPlay.h"
],
"appDelegateImports": ["RNCarPlay.h"],
"appDelegateMethods": {
"application": {
"didConnectCarInterfaceController": [
"[RNCarPlay connectWithInterfaceController:interfaceController window:window]"
],
"didDisconnectCarInterfaceController": [
"[RNCarPlay disconnect]"
]
"didDisconnectCarInterfaceController": ["[RNCarPlay disconnect]"]
}
}
}
Expand All @@ -92,9 +85,7 @@
],
"templateXcode": {
"Podfile": {
"header": [
"$RNFirebaseAsStaticFramework = true"
]
"header": ["$RNFirebaseAsStaticFramework = true"]
}
}
}
Expand Down Expand Up @@ -159,4 +150,4 @@
}
}
}
}
}
19 changes: 19 additions & 0 deletions packages/app-harness/src/app/NewModuleButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import { NativeModules, Button } from 'react-native';

const NewModuleButton = () => {
const { TestNativeModule } = NativeModules;
const callback = (error: any, result: string) => {
if (error) {
console.log(error);
} else {
console.log(result);
}
};
const onPress = () => {
TestNativeModule.createTestEvent('testName', 'testLocation', callback);
};
return <Button title="Click to invoke native module!" color="#841584" onPress={onPress} />;
};

export default NewModuleButton;
32 changes: 27 additions & 5 deletions packages/app-harness/src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
import React, { useEffect } from 'react';
import { Text, View } from 'react-native';
import { testProps } from '../config';
import React, { useEffect, useState } from 'react';
import { Button, Text, View } from 'react-native';
import SplashScreen from 'react-native-splash-screen';
import NewModuleButton from './NewModuleButton';
import { OrientationLocker, PORTRAIT, LANDSCAPE } from 'react-native-orientation-locker';
import { isPlatformAndroid } from '@rnv/renative';

const App = () => {
const [showVideo, setShowVideo] = useState(false);
useEffect(() => {
SplashScreen.hide();
}, []);
return (
<View>
<Text {...testProps('app-harness-home-screen-intro-text')}>ReNative Harness</Text>
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>ReNative Harness</Text>
<Text>{`hermes: ${typeof HermesInternal === 'object' && HermesInternal !== null ? 'yes' : 'no'}`}</Text>
{isPlatformAndroid ? (
<>
<NewModuleButton />
<OrientationLocker
orientation={PORTRAIT}
onChange={(orientation) => console.log('onChange', orientation)}
onDeviceChange={(orientation) => console.log('onDeviceChange', orientation)}
/>
<Button title="Toggle Video" onPress={() => setShowVideo(!showVideo)} />
{showVideo && (
<View>
<OrientationLocker orientation={LANDSCAPE} />
<View style={{ width: 320, height: 180, backgroundColor: '#ccc' }}>
<Text>Landscape video goes here</Text>
</View>
</View>
)}
</>
) : null}
</View>
);
};
Expand Down
43 changes: 22 additions & 21 deletions packages/app-harness/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"extends": "@flexn/typescript-config/tsconfig.app.json",
"compilerOptions": {
"outDir": "./lib",
"rootDir": ".",
"noImplicitAny": false,
// "resolveJsonModule": false
"plugins": [
{
"name": "next"
}
"extends": "@flexn/typescript-config/tsconfig.app.json",
"compilerOptions": {
"outDir": "./lib",
"rootDir": ".",
"noImplicitAny": false,
// "resolveJsonModule": false
"plugins": [
{
"name": "next"
}
],
"strictNullChecks": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"platformBuilds/template_web/.next/types/**/*.ts",
"platformBuilds/harness_web/.next/types/**/*.ts",
".next/types/**/*.ts",
"platformBuilds/harness_web/output/types/**/*.ts"
],
"strictNullChecks": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"platformBuilds/template_web/.next/types/**/*.ts",
"platformBuilds/harness_web/.next/types/**/*.ts",
".next/types/**/*.ts",
"platformBuilds/harness_web/output/types/**/*.ts"
]
"exclude": ["**/rn_modules"]
}
13 changes: 12 additions & 1 deletion packages/core/jsonSchema/rnv.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@
},
"buildToolsVersion": {
"type": "string",
"default": "30.0.0",
"default": "34.0.0",
"description": "Override android build tools version"
},
"disableSigning": {
Expand Down Expand Up @@ -3359,6 +3359,11 @@
"default": false,
"description": "Marks plugin platform disabled"
},
"forceLinking": {
"type": "boolean",
"default": false,
"description": "Packages that cannot be autolinked yet can still be added to MainApplication PackageList dynamically by setting this to true"
},
"path": {
"type": "string",
"description": "Enables you to pass custom path to plugin. If undefined, the default `node_modules/[plugin-name]` will be used."
Expand Down Expand Up @@ -3452,6 +3457,9 @@
"disabled": {
"$ref": "#/definitions/rnv.app/properties/plugins/additionalProperties/anyOf/0/properties/android/properties/disabled"
},
"forceLinking": {
"$ref": "#/definitions/rnv.app/properties/plugins/additionalProperties/anyOf/0/properties/android/properties/forceLinking"
},
"path": {
"$ref": "#/definitions/rnv.app/properties/plugins/additionalProperties/anyOf/0/properties/android/properties/path"
},
Expand Down Expand Up @@ -3529,6 +3537,9 @@
"disabled": {
"$ref": "#/definitions/rnv.app/properties/plugins/additionalProperties/anyOf/0/properties/android/properties/disabled"
},
"forceLinking": {
"$ref": "#/definitions/rnv.app/properties/plugins/additionalProperties/anyOf/0/properties/android/properties/forceLinking"
},
"path": {
"$ref": "#/definitions/rnv.app/properties/plugins/additionalProperties/anyOf/0/properties/android/properties/path"
}
Expand Down
Loading
Loading