Skip to content

Commit 51371f0

Browse files
committed
initial commit
0 parents  commit 51371f0

71 files changed

Lines changed: 2646 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: 2
2+
enable-beta-ecosystems: true
3+
updates:
4+
- package-ecosystem: 'github-actions'
5+
directory: '/'
6+
schedule:
7+
interval: 'daily'
8+
labels:
9+
- 'dependencies'
10+
11+
- package-ecosystem: 'gradle'
12+
directories:
13+
- '/android/'
14+
- '/example/android/'
15+
schedule:
16+
interval: 'daily'
17+
labels:
18+
- 'nitro-core'
19+
- 'nitrogen'
20+
- 'dependencies'
21+
- 'kotlin'
22+
23+
- package-ecosystem: 'bundler'
24+
directory: '/example/'
25+
schedule:
26+
interval: 'daily'
27+
labels:
28+
- 'dependencies'
29+
- 'ruby'
30+
31+
- package-ecosystem: 'npm'
32+
directories:
33+
- '/example/'
34+
- '/'
35+
schedule:
36+
interval: 'daily'
37+
labels:
38+
- 'nitro-core'
39+
- 'dependencies'
40+
- 'typescript'
41+
- 'nitrogen'
42+
43+
groups:
44+
react-native-cli:
45+
patterns:
46+
- '@react-native-community/cli*'
47+
babel:
48+
patterns:
49+
- '@babel/*'
50+
react-native:
51+
patterns:
52+
- '@react-native/*'
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build Android
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- '.github/workflows/android-build.yml'
12+
- 'example/android/**'
13+
- 'nitrogen/generated/shared/**'
14+
- 'nitrogen/generated/android/**'
15+
- 'cpp/**'
16+
- 'android/**'
17+
- '**/bun.lock'
18+
- '**/react-native.config.js'
19+
- '**/nitro.json'
20+
pull_request:
21+
paths:
22+
- '.github/workflows/android-build.yml'
23+
- 'example/android/**'
24+
- '**/nitrogen/generated/shared/**'
25+
- '**/nitrogen/generated/android/**'
26+
- 'cpp/**'
27+
- 'android/**'
28+
- '**/bun.lock'
29+
- '**/react-native.config.js'
30+
- '**/nitro.json'
31+
workflow_dispatch:
32+
33+
concurrency:
34+
group: ${{ github.workflow }}-${{ github.ref }}
35+
cancel-in-progress: true
36+
37+
jobs:
38+
build:
39+
name: Build Android Example App (${{ matrix.arch }})
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
arch: [new, old]
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: oven-sh/setup-bun@v2
48+
49+
- name: Install dependencies (bun)
50+
run: bun install
51+
52+
- name: Disable new architecture in gradle.properties
53+
if: matrix.arch == 'old'
54+
run: sed -i "s/newArchEnabled=true/newArchEnabled=false/g" example/android/gradle.properties
55+
56+
- name: Setup JDK 17
57+
uses: actions/setup-java@v5
58+
with:
59+
distribution: 'zulu'
60+
java-version: '17'
61+
cache: 'gradle'
62+
63+
- name: Cache Gradle
64+
uses: actions/cache@v4
65+
with:
66+
path: |
67+
~/.gradle/caches
68+
~/.gradle/wrapper
69+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/**/*.gradle*') }}
70+
restore-keys: |
71+
${{ runner.os }}-gradle-
72+
73+
- name: Run Gradle build
74+
working-directory: example/android
75+
run: ./gradlew assembleDebug --no-daemon --build-cache
76+
77+
- name: Stop Gradle daemon
78+
working-directory: example/android
79+
run: ./gradlew --stop

.github/workflows/ios-build.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Build iOS
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- '.github/workflows/ios-build.yml'
12+
- 'example/ios/**'
13+
- 'example/Gemfile'
14+
- 'example/Gemfile.lock'
15+
- '**/nitrogen/generated/shared/**'
16+
- '**/nitrogen/generated/ios/**'
17+
- 'cpp/**'
18+
- 'ios/**'
19+
- '**/Podfile.lock'
20+
- '**/bun.lock'
21+
- '**/*.podspec'
22+
- '**/react-native.config.js'
23+
- '**/nitro.json'
24+
pull_request:
25+
paths:
26+
- '.github/workflows/ios-build.yml'
27+
- 'example/ios/**'
28+
- 'example/Gemfile'
29+
- 'example/Gemfile.lock'
30+
- '**/nitrogen/generated/shared/**'
31+
- '**/nitrogen/generated/ios/**'
32+
- 'cpp/**'
33+
- 'ios/**'
34+
- '**/Podfile.lock'
35+
- '**/bun.lock'
36+
- '**/*.podspec'
37+
- '**/react-native.config.js'
38+
- '**/nitro.json'
39+
workflow_dispatch:
40+
41+
env:
42+
USE_CCACHE: 1
43+
44+
concurrency:
45+
group: ${{ github.workflow }}-${{ github.ref }}
46+
cancel-in-progress: true
47+
48+
jobs:
49+
build:
50+
name: Build iOS Example App (${{ matrix.arch }})
51+
runs-on: macOS-15
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
arch: [new, old]
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: oven-sh/setup-bun@v2
59+
- name: Setup Xcode
60+
uses: maxim-lobanov/setup-xcode@v1
61+
with:
62+
xcode-version: 16.4
63+
64+
- name: Install dependencies (bun)
65+
run: bun install
66+
67+
- name: Disable new architecture in Podfile
68+
if: matrix.arch == 'old'
69+
run: sed -i "" "s/ENV\['RCT_NEW_ARCH_ENABLED'\] = '1'/ENV['RCT_NEW_ARCH_ENABLED'] = '0'/g" example/ios/Podfile
70+
71+
- name: Setup Ruby (bundle)
72+
uses: ruby/setup-ruby@v1
73+
with:
74+
ruby-version: '3.2'
75+
bundler-cache: true
76+
working-directory: example/ios
77+
78+
- name: Install xcpretty
79+
run: gem install xcpretty
80+
81+
- name: Cache CocoaPods
82+
uses: actions/cache@v4
83+
with:
84+
path: |
85+
~/.cocoapods/repos
86+
example/ios/Pods
87+
key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile.lock') }}
88+
restore-keys: |
89+
${{ runner.os }}-pods-
90+
91+
- name: Install Pods
92+
working-directory: example/ios
93+
run: pod install
94+
95+
- name: Build App
96+
working-directory: example/ios
97+
run: |
98+
set -o pipefail && xcodebuild \
99+
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
100+
-derivedDataPath build -UseModernBuildSystem=YES \
101+
-workspace NitroTextExample.xcworkspace \
102+
-scheme NitroTextExample \
103+
-sdk iphonesimulator \
104+
-configuration Debug \
105+
-destination 'platform=iOS Simulator,name=iPhone 16' \
106+
build \
107+
CODE_SIGNING_ALLOWED=NO | xcpretty

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
issues: write
20+
pull-requests: write
21+
id-token: write
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- name: Setup Bun.js
28+
uses: oven-sh/setup-bun@v2
29+
with:
30+
bun-version: latest
31+
- name: Cache bun dependencies
32+
id: bun-cache
33+
uses: actions/cache@v4
34+
with:
35+
path: ~/.bun/install/cache
36+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
37+
restore-keys: |
38+
${{ runner.os }}-bun-
39+
40+
- name: Install npm dependencies (bun)
41+
run: bun install
42+
43+
- name: Build lib
44+
run: bun run build
45+
46+
- name: Release
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
50+
NPM_CONFIG_PROVENANCE: true
51+
GIT_AUTHOR_NAME: ${{ github.actor }}
52+
GIT_AUTHOR_EMAIL: "${{ github.actor }}@users.noreply.github.com"
53+
GIT_COMMITTER_NAME: ${{ github.actor }}
54+
GIT_COMMITTER_EMAIL: "${{ github.actor }}@users.noreply.github.com"
55+
run: bun release

.gitignore

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# XDE
6+
.expo/
7+
8+
# VSCode
9+
.vscode/
10+
jsconfig.json
11+
12+
# Xcode
13+
#
14+
build/
15+
*.pbxuser
16+
!default.pbxuser
17+
*.mode1v3
18+
!default.mode1v3
19+
*.mode2v3
20+
!default.mode2v3
21+
*.perspectivev3
22+
!default.perspectivev3
23+
xcuserdata
24+
*.xccheckout
25+
*.moved-aside
26+
DerivedData
27+
*.hmap
28+
*.ipa
29+
*.xcuserstate
30+
project.xcworkspace
31+
32+
# Android/IJ
33+
#
34+
.classpath
35+
.cxx
36+
.gradle
37+
.idea
38+
.project
39+
.settings
40+
local.properties
41+
android.iml
42+
43+
# Cocoapods
44+
#
45+
example/ios/Pods
46+
47+
# Ruby
48+
example/vendor/
49+
50+
# node.js
51+
#
52+
node_modules/
53+
npm-debug.log
54+
yarn-debug.log
55+
yarn-error.log
56+
57+
# BUCK
58+
buck-out/
59+
\.buckd/
60+
android/app/libs
61+
android/keystores/debug.keystore
62+
63+
# Yarn
64+
.yarn/*
65+
!.yarn/patches
66+
!.yarn/plugins
67+
!.yarn/releases
68+
!.yarn/sdks
69+
!.yarn/versions
70+
.kotlin
71+
72+
# Expo
73+
.expo/
74+
75+
# generated by bob
76+
lib/
77+
tsconfig.tsbuildinfo

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)