Skip to content

Commit 34c73f0

Browse files
committed
add support for new architecture
1 parent 08189f8 commit 34c73f0

21 files changed

+2405
-134
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,18 @@ project.xcworkspace
3131

3232
# Android/IJ
3333
#
34+
.classpath
35+
.cxx
3436
.idea
3537
.gradle
38+
.project
39+
.settings
3640
local.properties
3741
android.iml
3842

43+
# Ruby
44+
example/vendor/
45+
3946
# Cocoapods
4047
#
4148
example/ios/Pods
@@ -49,6 +56,15 @@ yarn-error.log
4956
yarn.lock
5057
package-lock.json
5158

59+
# Yarn
60+
.yarn/*
61+
!.yarn/patches
62+
!.yarn/plugins
63+
!.yarn/releases
64+
!.yarn/sdks
65+
!.yarn/versions
66+
67+
5268
# BUCK
5369
buck-out/
5470
\.buckd/
@@ -68,3 +84,8 @@ google-services.json
6884
/.bundle/
6985
/vendor/bundle
7086
/lib/bundler/man/
87+
88+
89+
# React Native Codegen
90+
ios/generated
91+
android/generated

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.6.1.cjs

Lines changed: 874 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc

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

.yarnrc.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
nodeLinker: node-modules
2+
nmHoistingLimits: workspaces
3+
4+
plugins:
5+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
6+
spec: "@yarnpkg/plugin-interactive-tools"
7+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
8+
spec: "@yarnpkg/plugin-workspace-tools"
9+
10+
yarnPath: .yarn/releases/yarn-3.6.1.cjs

android/build.gradle

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,21 @@ buildscript {
2020

2121
dependencies {
2222
classpath("com.android.tools.build:gradle:8.6.1")
23-
classpath("com.facebook.react:react-native-gradle-plugin")
2423
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
2524
}
2625
}
2726
}
2827

2928
apply plugin: 'com.android.library'
3029

30+
def isNewArchitectureEnabled() {
31+
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
32+
}
33+
34+
if (isNewArchitectureEnabled()) {
35+
apply plugin: "com.facebook.react"
36+
}
37+
3138
def safeExtGet(prop, fallback) {
3239
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
3340
}
@@ -53,6 +60,18 @@ android {
5360
lintOptions {
5461
disable 'GradleCompatible'
5562
}
63+
buildFeatures {
64+
buildConfig true
65+
}
66+
sourceSets {
67+
main {
68+
if (isNewArchitectureEnabled()) {
69+
java.srcDirs += ["src/newarch"]
70+
} else {
71+
java.srcDirs += ["src/oldarch"]
72+
}
73+
}
74+
}
5675
}
5776

5877
repositories {

0 commit comments

Comments
 (0)