Skip to content

Commit 1f422a2

Browse files
authored
Update configuration for the new architecture (oblador#94)
* Update `build.gradle` * Update podspec * Update `codegenConfig` * Enable new arch on android
1 parent b6ae7f1 commit 1f422a2

File tree

4 files changed

+9
-28
lines changed

4 files changed

+9
-28
lines changed

examples/vanilla/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3737
# your application. You should enable this flag either if you want
3838
# to write custom TurboModules/Fabric components OR use libraries that
3939
# are providing them.
40-
newArchEnabled=false
40+
newArchEnabled=true
4141

4242
# Use this property to enable or disable the Hermes JS engine.
4343
# If set to false, you will be using JSC instead.

packages/react-native-performance/android/build.gradle

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,5 @@ repositories {
100100
}
101101

102102
dependencies {
103-
if (isNewArchitectureEnabled()) {
104-
implementation project(":ReactAndroid")
105-
} else {
106-
implementation 'com.facebook.react:react-native:+'
107-
}
108-
}
109-
110-
if (isNewArchitectureEnabled()) {
111-
react {
112-
libraryName = "rnperformance"
113-
codegenJavaPackageName = "com.oblador.performance"
114-
reactNativeDir = rootProject.file("${nodeModules}/react-native")
115-
jsRootDir = file("../src/")
116-
codegenDir = rootProject.file("${nodeModules}/react-native-codegen")
117-
}
103+
implementation 'com.facebook.react:react-native:+'
118104
}

packages/react-native-performance/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,12 @@
5151
"typescript": "^4.8.3"
5252
},
5353
"codegenConfig": {
54-
"libraries": [
55-
{
56-
"name": "RNPerformanceSpec",
57-
"type": "modules",
58-
"jsSrcsDir": "src"
59-
}
60-
]
54+
"name": "RNPerformanceSpec",
55+
"type": "modules",
56+
"jsSrcsDir": "./src",
57+
"android": {
58+
"javaPackageName": "com.oblador.performance"
59+
}
6160
},
6261
"react-native-builder-bob": {
6362
"source": "src",

packages/react-native-performance/react-native-performance.podspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ Pod::Spec.new do |s|
2626
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
2727
}
2828

29-
s.dependency "React-Codegen"
30-
s.dependency "RCT-Folly"
31-
s.dependency "RCTRequired"
32-
s.dependency "RCTTypeSafety"
33-
s.dependency "ReactCommon/turbomodule/core"
29+
install_modules_dependencies(s)
3430
end
3531
end

0 commit comments

Comments
 (0)