Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions .github/workflows/build-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
XCODE_VERSION: 16.3
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
RCT_REMOVE_LEGACY_ARCH: 1
RCT_USE_RN_DEP: 1
RCT_USE_PREBUILT_RNCORE: 1

Expand Down Expand Up @@ -145,20 +146,20 @@ jobs:
run: |
# Build Android for only some matrices to skip redundant builds
if [[ ${{ matrix.os }} =~ ubuntu ]]; then
if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == *-objc ]]; then
if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == *-objc ]] || [[ ${{ matrix.type.name }} == nitro-* ]]; then
echo "android_build=1" >> $GITHUB_ENV
fi
fi

# Build iOS for only some matrices to skip redundant builds
if [[ ${{ matrix.os }} =~ macos ]]; then
if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == kotlin-* ]]; then
if [[ ${{ matrix.type.name }} == *-view && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == *-module && ${{ matrix.type.language }} == kotlin-* ]] || [[ ${{ matrix.type.name }} == nitro-* ]]; then
echo "ios_build=1" >> $GITHUB_ENV
fi
fi

- name: Generate nitrogen code
if: matrix.type == 'nitro-view' || matrix.type == 'nitro-module'
if: matrix.type.name == 'nitro-view' || matrix.type.name == 'nitro-module'
working-directory: ${{ env.work_dir }}
run: yarn nitrogen

Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-native-library/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const FALLBACK_BOB_VERSION = '0.40.13';
export const FALLBACK_NITRO_MODULES_VERSION = '0.29.8';
export const SUPPORTED_REACT_NATIVE_VERSION = '0.81.1';
export const SUPPORTED_REACT_NATIVE_VERSION = '0.83.0';
2 changes: 1 addition & 1 deletion packages/create-react-native-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async function create() {
await alignDependencyVersionsWithExampleApp(rootPackageJson, folder);
}

if (!answers.local && answers.tools.length > 0) {
if (!answers.local) {
spinner.text = 'Configuring tools';

await configureTools({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs from 'fs-extra';
import path from 'node:path';
import { applyTemplate, type TemplateConfiguration } from '../template';
import sortObjectKeys from './sortObjectKeys';
import { SUPPORTED_REACT_NATIVE_VERSION } from '../constants';

type Tool = {
name: string;
Expand Down Expand Up @@ -35,7 +36,7 @@ const ESLINT = {
'@eslint/compat': '^1.3.2',
'@eslint/eslintrc': '^3.3.1',
'@eslint/js': '^9.35.0',
'@react-native/eslint-config': '^0.81.1',
'@react-native/eslint-config': SUPPORTED_REACT_NATIVE_VERSION,
'eslint-config-prettier': '^10.1.8',
'eslint-plugin-prettier': '^5.5.4',
'eslint': '^9.35.0',
Expand Down Expand Up @@ -134,7 +135,7 @@ export const AVAILABLE_TOOLS = {
} as const satisfies Record<string, Tool>;

const REQUIRED_TOOLS = {
turbo: TURBOREPO,
turborepo: TURBOREPO,
} as const satisfies Record<string, Tool>;

const ALL_TOOLS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,14 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
<% if (example === 'vanilla' && (project.moduleConfig === 'turbo-modules' || project.viewConfig === 'fabric-view')) { -%>
"@react-native-community/cli": "20.0.1",
<% } -%>
"@react-native/babel-preset": "0.81.1",
"@react-native/babel-preset": "0.83.0",
"@types/react": "^19.1.12",
"del-cli": "^6.0.0",
<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
"nitrogen": "^<%- versions.nitro %>",
<% } -%>
"react": "19.1.0",
"react-native": "0.81.1",
"react-native": "0.83.0",
"react-native-builder-bob": "^<%- versions.bob %>",
<% if (project.moduleConfig === 'nitro-modules' || project.viewConfig === 'nitro-view') { -%>
"react-native-nitro-modules": "^<%- versions.nitro %>",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.margelo.nitro.<%- project.package %>

import com.facebook.react.TurboReactPackage
import com.facebook.react.BaseReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.module.model.ReactModuleInfoProvider
import com.facebook.react.uimanager.ViewManager

import <%- project.package_cpp -%>.views.Hybrid<%- project.name -%>Manager
import com.margelo.nitro.<%- project.package %>.views.Hybrid<%- project.name -%>Manager

class <%- project.name -%>Package : TurboReactPackage() {
class <%- project.name -%>Package : BaseReactPackage() {
override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
return null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build:ios": {
"env": [
"RCT_NEW_ARCH_ENABLED",
"RCT_REMOVE_LEGACY_ARCH",
"RCT_USE_RN_DEP",
"RCT_USE_PREBUILT_RNCORE"
],
Expand Down
Loading