Skip to content

Commit 910a2dc

Browse files
committed
Merge branch 'main' into pr/26
2 parents f7642c3 + 57ef1a6 commit 910a2dc

File tree

212 files changed

+42508
-29984
lines changed

Some content is hidden

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

212 files changed

+42508
-29984
lines changed

.bundle/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

.clang-format

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Config for clang-format version 16
2+
3+
# Standard
4+
BasedOnStyle: llvm
5+
Standard: c++20
6+
7+
# Indentation
8+
IndentWidth: 2
9+
ColumnLimit: 140
10+
11+
# Includes
12+
SortIncludes: CaseSensitive
13+
SortUsingDeclarations: true
14+
15+
# Pointer and reference alignment
16+
PointerAlignment: Left
17+
ReferenceAlignment: Left
18+
ReflowComments: true
19+
20+
# Line breaking options
21+
BreakBeforeBraces: Attach
22+
BreakConstructorInitializers: BeforeColon
23+
AlwaysBreakTemplateDeclarations: true
24+
AllowShortFunctionsOnASingleLine: Empty
25+
IndentCaseLabels: true
26+
NamespaceIndentation: Inner

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
indent_style = space
10+
indent_size = 2
11+
12+
end_of_line = lf
13+
charset = utf-8
14+
trim_trailing_whitespace = true
15+
insert_final_newline = true

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.pbxproj -text
22
# specific for windows script files
3-
*.bat text eol=crlf
3+
*.bat text eol=crlf
4+
.lockb binary diff=lockb

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: [mrousavy]
1+
github: [mrousavy, chrispader]

.github/dependabot.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 2
2+
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+
- '/package/android/'
14+
- '/example/android/'
15+
schedule:
16+
interval: 'daily'
17+
labels:
18+
- 'dependencies'
19+
- 'kotlin'
20+
21+
- package-ecosystem: 'npm'
22+
directories:
23+
- '/package/'
24+
- '/example/'
25+
schedule:
26+
interval: 'daily'
27+
labels:
28+
- 'dependencies'
29+
- 'typescript'
30+
groups:
31+
rncli:
32+
patterns:
33+
- '@react-native-community/cli*'
34+
babel:
35+
patterns:
36+
- '@babel/*'
37+
rn:
38+
patterns:
39+
- '@react-native/*'
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build Android (Release)
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build_release:
9+
name: Build Android Example App (release, new architecture)
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: oven-sh/setup-bun@v2
14+
15+
- name: Install npm dependencies (bun)
16+
run: bun install
17+
18+
- name: Setup JDK 17
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: "zulu"
22+
java-version: 17
23+
java-package: jdk
24+
25+
- name: Restore Gradle cache
26+
uses: actions/cache@v4
27+
with:
28+
path: |
29+
~/.gradle/caches
30+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
31+
restore-keys: |
32+
${{ runner.os }}-gradle-
33+
- name: Run Gradle Build for example/android/
34+
working-directory: example/android
35+
run: ./gradlew assembleRelease --no-daemon --build-cache
36+
37+
- name: Upload APK to Release
38+
uses: actions/upload-release-asset@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
upload_url: ${{ github.event.release.upload_url }}
43+
asset_path: example/android/app/build/outputs/apk/release/app-release.apk
44+
asset_name: "NitroSQLiteExample-${{ github.event.release.tag_name }}.apk"
45+
asset_content_type: application/vnd.android.package-archive
46+
47+
# Gradle cache doesn't like daemons
48+
- name: Stop Gradle Daemon
49+
working-directory: example/android
50+
run: ./gradlew --stop
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Build Android
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- ".github/workflows/build-android.yml"
9+
- "example/android/**"
10+
- "**/nitrogen/generated/shared/**"
11+
- "**/nitrogen/generated/android/**"
12+
- "package/cpp/**"
13+
- "package/android/**"
14+
- "bun.lockb"
15+
- "**/react-native.config.js"
16+
- "**/nitro.json"
17+
pull_request:
18+
paths:
19+
- ".github/workflows/build-android.yml"
20+
- "example/android/**"
21+
- "**/nitrogen/generated/shared/**"
22+
- "**/nitrogen/generated/android/**"
23+
- "package/cpp/**"
24+
- "package/android/**"
25+
- "bun.lockb"
26+
- "**/react-native.config.js"
27+
- "**/nitro.json"
28+
29+
jobs:
30+
build_new:
31+
name: Build Android Example App (new architecture)
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: oven-sh/setup-bun@v2
36+
37+
- name: Install npm dependencies (bun)
38+
run: bun install
39+
40+
- name: Setup JDK 17
41+
uses: actions/setup-java@v4
42+
with:
43+
distribution: "zulu"
44+
java-version: 17
45+
java-package: jdk
46+
47+
- name: Restore Gradle cache
48+
uses: actions/cache@v4
49+
with:
50+
path: |
51+
~/.gradle/caches
52+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
53+
restore-keys: |
54+
${{ runner.os }}-gradle-
55+
- name: Run Gradle Build for example/android/
56+
working-directory: example/android
57+
run: ./gradlew assembleDebug --no-daemon --build-cache
58+
59+
# Gradle cache doesn't like daemons
60+
- name: Stop Gradle Daemon
61+
working-directory: example/android
62+
run: ./gradlew --stop
63+
64+
build_old:
65+
name: Build Android Example App (old architecture)
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: oven-sh/setup-bun@v2
70+
71+
- name: Install npm dependencies (bun)
72+
run: bun install
73+
74+
- name: Disable new architecture in gradle.properties
75+
run: sed -i "s/newArchEnabled=true/newArchEnabled=false/g" example/android/gradle.properties
76+
77+
- name: Setup JDK 17
78+
uses: actions/setup-java@v4
79+
with:
80+
distribution: "zulu"
81+
java-version: 17
82+
java-package: jdk
83+
84+
- name: Restore Gradle cache
85+
uses: actions/cache@v4
86+
with:
87+
path: |
88+
~/.gradle/caches
89+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
90+
restore-keys: |
91+
${{ runner.os }}-gradle-
92+
- name: Run Gradle Build for example/android/
93+
working-directory: example/android
94+
run: ./gradlew assembleDebug --no-daemon --build-cache
95+
96+
# Gradle cache doesn't like daemons
97+
- name: Stop Gradle Daemon
98+
working-directory: example/android
99+
run: ./gradlew --stop

.github/workflows/build-ios.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Build iOS
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- ".github/workflows/build-ios.yml"
9+
- "example/ios/**"
10+
- "**/nitrogen/generated/shared/**"
11+
- "**/nitrogen/generated/ios/**"
12+
- "package/cpp/**"
13+
- "package/ios/**"
14+
- "**/Podfile.lock"
15+
- "**/*.podspec"
16+
- "**/react-native.config.js"
17+
- "**/nitro.json"
18+
pull_request:
19+
paths:
20+
- ".github/workflows/build-ios.yml"
21+
- "example/ios/**"
22+
- "**/nitrogen/generated/shared/**"
23+
- "**/nitrogen/generated/ios/**"
24+
- "package/cpp/**"
25+
- "package/ios/**"
26+
- "**/Podfile.lock"
27+
- "**/*.podspec"
28+
- "**/react-native.config.js"
29+
- "**/nitro.json"
30+
31+
env:
32+
USE_CCACHE: 1
33+
34+
jobs:
35+
build_new:
36+
name: Build iOS Example App (new architecture)
37+
runs-on: macOS-15
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: oven-sh/setup-bun@v2
41+
42+
- name: Install npm dependencies (bun)
43+
run: bun install
44+
45+
- name: Restore ccache
46+
uses: hendrikmuhs/[email protected]
47+
48+
- name: Setup Ruby (bundle)
49+
uses: ruby/setup-ruby@v1
50+
with:
51+
ruby-version: 2.7.2
52+
bundler-cache: true
53+
working-directory: example/ios
54+
55+
- name: Restore Pods cache
56+
uses: actions/cache@v4
57+
with:
58+
path: example/ios/Pods
59+
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
60+
restore-keys: |
61+
${{ runner.os }}-pods-
62+
- name: Install Pods
63+
working-directory: example/ios
64+
run: pod install
65+
- name: Build App
66+
working-directory: example/ios
67+
run: "set -o pipefail && xcodebuild \
68+
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
69+
-derivedDataPath build -UseModernBuildSystem=YES \
70+
-workspace NitroSQLiteExample.xcworkspace \
71+
-scheme NitroSQLiteExample \
72+
-sdk iphonesimulator \
73+
-configuration Debug \
74+
-destination 'platform=iOS Simulator,name=iPhone 16' \
75+
build \
76+
CODE_SIGNING_ALLOWED=NO"
77+
78+
build_old:
79+
name: Build iOS Example App (old architecture)
80+
runs-on: macOS-15
81+
steps:
82+
- uses: actions/checkout@v4
83+
- uses: oven-sh/setup-bun@v2
84+
85+
- name: Install npm dependencies (bun)
86+
run: bun install
87+
88+
- name: Disable new architecture in Podfile
89+
run: sed -i "" "s/ENV\['RCT_NEW_ARCH_ENABLED'\] = '1'/ENV['RCT_NEW_ARCH_ENABLED'] = '0'/g" example/ios/Podfile
90+
91+
- name: Restore buildcache
92+
uses: mikehardy/buildcache-action@v2
93+
continue-on-error: true
94+
95+
- name: Setup Ruby (bundle)
96+
uses: ruby/setup-ruby@v1
97+
with:
98+
ruby-version: 2.7.2
99+
bundler-cache: true
100+
working-directory: example/ios
101+
102+
- name: Restore Pods cache
103+
uses: actions/cache@v4
104+
with:
105+
path: example/ios/Pods
106+
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
107+
restore-keys: |
108+
${{ runner.os }}-pods-
109+
- name: Install Pods
110+
working-directory: example/ios
111+
run: pod install
112+
- name: Build App
113+
working-directory: example/ios
114+
run: "set -o pipefail && xcodebuild \
115+
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
116+
-derivedDataPath build -UseModernBuildSystem=YES \
117+
-workspace NitroSQLiteExample.xcworkspace \
118+
-scheme NitroSQLiteExample \
119+
-sdk iphonesimulator \
120+
-configuration Debug \
121+
-destination 'platform=iOS Simulator,name=iPhone 16' \
122+
build \
123+
CODE_SIGNING_ALLOWED=NO"

0 commit comments

Comments
 (0)