Skip to content

Commit a5f61db

Browse files
fix androidtv
1 parent 3572e38 commit a5f61db

File tree

12 files changed

+725
-1662
lines changed

12 files changed

+725
-1662
lines changed

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@
127127
},
128128
"private": true,
129129
"resolutions": {
130-
"@react-native-community/cli-platform-ios": "12.3.6",
131-
"@react-native/gradle-plugin": "0.76.3",
132-
"@react-native/codegen": "0.76.3"
130+
"@react-native-community/cli-platform-ios": "12.3.6"
133131
},
134132
"title": "ReNative",
135133
"husky": {

packages/app-harness/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"react-native-photo-editor": "github:AppGyver/react-native-photo-editor#0.1.2",
6262
"react-native-safe-area-context": "5.0.0",
6363
"react-native-splash-screen": "3.3.0",
64-
"react-native-tvos": "0.73.6-0",
64+
"react-native-tvos": "0.76.3-0",
6565
"react-native-web": "0.19.12",
6666
"rn-fetch-blob": "0.12.0"
6767
},
File renamed without changes.

packages/config-templates/renative.templates.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3358,7 +3358,7 @@
33583358
}
33593359
},
33603360
"react-native-tvos": {
3361-
"version": "0.73.6-0",
3361+
"version": "0.76.3-0",
33623362
"supportedPlatforms": ["tvos", "firetv", "androidtv"]
33633363
},
33643364
"react-native-tvos-controller": {

packages/engine-rn-tvos/src/adapters/metroAdapter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Env } from '@rnv/core';
1+
import { Env, fsExistsSync } from '@rnv/core';
22
import { withMetroConfig, mergeConfig, InputConfig } from '@rnv/sdk-react-native';
33

44
const path = require('path');
@@ -34,8 +34,8 @@ export const withRNVMetro = (config: InputConfig) => {
3434
const projectPath = env.RNV_PROJECT_ROOT || process.cwd();
3535

3636
const defaultConfig = withMetroConfig(projectPath);
37-
38-
const watchFolders = [path.resolve(projectPath, 'node_modules')];
37+
const projectNodeModulesPath = path.resolve(projectPath, 'node_modules');
38+
const watchFolders = fsExistsSync(projectNodeModulesPath) ? [projectNodeModulesPath] : [];
3939

4040
const metroCache = require(require.resolve('metro-cache', { paths: [projectPath] }));
4141

packages/engine-rn-tvos/templates/platforms/androidtv/app/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ react {
5252
//
5353
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5454
// hermesFlags = ["-O", "-output-source-map"]
55+
56+
/* Autolinking */
57+
autolinkLibrariesWithApp()
5558
}
5659

5760
/**
@@ -126,6 +129,4 @@ dependencies {
126129
} else {
127130
implementation jscFlavor
128131
}
129-
}
130-
131-
apply from: file("{{PATH_REACT_NATIVE_CLI_ANDROID}}/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
132+
}

packages/engine-rn-tvos/templates/platforms/androidtv/app/src/main/java/rnv_template/MainApplication.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
99
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1213
import com.facebook.soloader.SoLoader
1314

1415
{{PLUGIN_IMPORTS}}
@@ -35,11 +36,11 @@ class MainApplication : Application(), ReactApplication {
3536
{{PLUGIN_METHODS}}
3637

3738
override val reactHost: ReactHost
38-
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
39+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
3940

4041
override fun onCreate() {
4142
super.onCreate()
42-
SoLoader.init(this, false)
43+
SoLoader.init(this, OpenSourceMergedSoMapping)
4344
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
4445
// If you opted-in for the New Architecture, we load the native entry point for this app.
4546
load()

packages/engine-rn-tvos/templates/platforms/androidtv/settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
pluginManagement { includeBuild('{{RN_GRADLE_PLUGIN_LOCATION}}') }
2+
plugins { id("com.facebook.react.settings") }
3+
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
14
rootProject.name = '{{RN_GRADLE_PROJECT_NAME}}'
25
apply from: file("{{RN_CLI_LOCATION}}/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
36
include ':app'

packages/engine-rn-windows/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@rnv/adapter": "1.7.0-rc.0",
3838
"@rnv/sdk-react-native": "1.7.0-rc.0",
3939
"@xmldom/xmldom": "0.7.7",
40-
"react-native-windows": "0.72.10",
40+
"react-native-windows": "0.76.2",
4141
"rimraf": "2.6.2",
4242
"typescript": "5.2.2"
4343
},

packages/engine-rn/src/adapters/metroAdapter.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,5 @@ export const withRNVMetro = (config: InputConfig): InputConfig => {
8888
};
8989

9090
const cnf = mergeConfig(defaultConfig, config, cnfRnv);
91-
console.log('metro cnf !!!!!!!!!', cnf);
92-
9391
return cnf;
9492
};

0 commit comments

Comments
 (0)