File tree Expand file tree Collapse file tree 8 files changed +15
-59
lines changed
packages/create-react-native-library
nitro-view/android/src/main/java/com/margelo/nitro/{%- project.package_dir %} Expand file tree Collapse file tree 8 files changed +15
-59
lines changed Original file line number Diff line number Diff line change 2121 XCODE_VERSION : 16.3
2222 TURBO_TOKEN : ${{ secrets.TURBO_TOKEN }}
2323 TURBO_TEAM : ${{ secrets.TURBO_TEAM }}
24+ RCT_REMOVE_LEGACY_ARCH : 1
2425 RCT_USE_RN_DEP : 1
2526 RCT_USE_PREBUILT_RNCORE : 1
2627
@@ -145,20 +146,20 @@ jobs:
145146 run : |
146147 # Build Android for only some matrices to skip redundant builds
147148 if [[ ${{ matrix.os }} =~ ubuntu ]]; then
148- if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == *-objc ]]; then
149+ if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == nitro-* ]] ; then
149150 echo "android_build=1" >> $GITHUB_ENV
150151 fi
151152 fi
152153
153154 # Build iOS for only some matrices to skip redundant builds
154155 if [[ ${{ matrix.os }} =~ macos ]]; then
155- if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == kotlin-* ]]; then
156+ if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == nitro-* ]] ; then
156157 echo "ios_build=1" >> $GITHUB_ENV
157158 fi
158159 fi
159160
160161 - name : Generate nitrogen code
161- if : matrix.type == 'nitro-view' || matrix.type == 'nitro-module'
162+ if : matrix.type.name == 'nitro-view' || matrix.type.name == 'nitro-module'
162163 working-directory : ${{ env.work_dir }}
163164 run : yarn nitrogen
164165
Original file line number Diff line number Diff line change 11export const FALLBACK_BOB_VERSION = '0.40.13' ;
22export const FALLBACK_NITRO_MODULES_VERSION = '0.29.8' ;
3- export const SUPPORTED_REACT_NATIVE_VERSION = '0.81.1 ' ;
3+ export const SUPPORTED_REACT_NATIVE_VERSION = '0.83.0 ' ;
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ async function create() {
101101 await alignDependencyVersionsWithExampleApp ( rootPackageJson , folder ) ;
102102 }
103103
104- if ( ! answers . local && answers . tools . length > 0 ) {
104+ if ( ! answers . local ) {
105105 spinner . text = 'Configuring tools' ;
106106
107107 await configureTools ( {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import fs from 'fs-extra';
22import path from 'node:path' ;
33import { applyTemplate , type TemplateConfiguration } from '../template' ;
44import sortObjectKeys from './sortObjectKeys' ;
5+ import { SUPPORTED_REACT_NATIVE_VERSION } from '../constants' ;
56
67type Tool = {
78 name : string ;
@@ -35,7 +36,7 @@ const ESLINT = {
3536 '@eslint/compat' : '^1.3.2' ,
3637 '@eslint/eslintrc' : '^3.3.1' ,
3738 '@eslint/js' : '^9.35.0' ,
38- '@react-native/eslint-config' : '^0.81.1' ,
39+ '@react-native/eslint-config' : SUPPORTED_REACT_NATIVE_VERSION ,
3940 'eslint-config-prettier' : '^10.1.8' ,
4041 'eslint-plugin-prettier' : '^5.5.4' ,
4142 'eslint' : '^9.35.0' ,
@@ -134,7 +135,7 @@ export const AVAILABLE_TOOLS = {
134135} as const satisfies Record < string , Tool > ;
135136
136137const REQUIRED_TOOLS = {
137- turbo : TURBOREPO ,
138+ turborepo : TURBOREPO ,
138139} as const satisfies Record < string , Tool > ;
139140
140141const ALL_TOOLS = {
Original file line number Diff line number Diff line change 6969 "registry" : " https://registry.npmjs.org/"
7070 },
7171 "devDependencies" : {
72- <% if (example === 'vanilla' && (project.moduleConfig === 'turbo-modules' || project.viewConfig === 'fabric-view')) { -%>
73- "@react-native-community/cli" : " 20.0.1" ,
74- <% } -%>
75- "@react-native/babel-preset" : " 0.81.1" ,
72+ "@react-native/babel-preset" : " 0.83.0" ,
7673 "@types/react" : " ^19.1.12" ,
7774 "del-cli" : " ^6.0.0" ,
7875<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
7976 "nitrogen" : " ^<%- versions.nitro %>" ,
8077<% } -%>
8178 "react" : " 19.1.0" ,
82- "react-native" : " 0.81.1 " ,
79+ "react-native" : " 0.83.0 " ,
8380 "react-native-builder-bob" : " ^<%- versions.bob %>" ,
8481<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
8582 "react-native-nitro-modules" : " ^<%- versions.nitro %>" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11package com.margelo.nitro.<%- project.package % >
22
3- import com.facebook.react.TurboReactPackage
3+ import com.facebook.react.BaseReactPackage
44import com.facebook.react.bridge.NativeModule
55import com.facebook.react.bridge.ReactApplicationContext
66import com.facebook.react.module.model.ReactModuleInfoProvider
77import com.facebook.react.uimanager.ViewManager
88
9- import <%- project.package_cpp -% > .views.Hybrid < %- project.name -% > Manager
9+ import com.margelo.nitro.awesomelib .views.Hybrid<%- project.name -% > Manager
1010
11- class < %- project.name -% > Package : TurboReactPackage () {
11+ class < %- project.name -% > Package : BaseReactPackage () {
1212 override fun getModule (name : String , reactContext : ReactApplicationContext ): NativeModule ? {
1313 return null
1414 }
Original file line number Diff line number Diff line change 2222 "build:ios" : {
2323 "env" : [
2424 " RCT_NEW_ARCH_ENABLED" ,
25+ " RCT_REMOVE_LEGACY_ARCH" ,
2526 " RCT_USE_RN_DEP" ,
2627 " RCT_USE_PREBUILT_RNCORE"
2728 ],
You can’t perform that action at this time.
0 commit comments