Skip to content

Commit ed2aa91

Browse files
committed
Apply rnrepo to FabricExample
1 parent ec0ea94 commit ed2aa91

5 files changed

Lines changed: 34 additions & 0 deletions

File tree

FabricExample/android/app/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ apply plugin: "com.android.application"
22
apply plugin: "org.jetbrains.kotlin.android"
33
apply plugin: "com.facebook.react"
44

5+
// Use RNRepo in CI builds
6+
if (System.getenv("CI") == "true") {
7+
apply plugin: "org.rnrepo.tools.prebuilds-plugin"
8+
}
9+
510
/**
611
* This is the configuration block to customize your React Native Android app.
712
* By default you don't need to apply any configuration, just uncomment the lines you need.

FabricExample/android/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ buildscript {
1515
classpath("com.android.tools.build:gradle")
1616
classpath("com.facebook.react:react-native-gradle-plugin")
1717
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
18+
// RNRepo plugin in CI builds (plugin applied in app/build.gradle)
19+
def rnrepoDir = new File(
20+
providers.exec {
21+
workingDir(rootDir)
22+
commandLine("node", "--print", "require.resolve('@rnrepo/build-tools/package.json')")
23+
}.standardOutput.asText.get().trim()
24+
).getParentFile().absolutePath
25+
classpath fileTree(dir: "${rnrepoDir}/gradle-plugin/build/libs", include: ["prebuilds-plugin.jar"])
1826
}
1927
}
2028

FabricExample/ios/Podfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ require Pod::Executable.execute_command('node', ['-p',
55
{paths: [process.argv[1]]},
66
)', __dir__]).strip
77

8+
# Use RNRepo in CI builds
9+
if ENV['CI'] == 'true'
10+
require Pod::Executable.execute_command('node', ['-p',
11+
'require.resolve(
12+
"@rnrepo/build-tools/cocoapods-plugin/lib/plugin.rb",
13+
{paths: [process.argv[1]]},
14+
)', __dir__]).strip
15+
end
16+
817
require_relative '../../scripts/ios/rns_update_info_plist'
918
require_relative '../../scripts/ios/rns_set_swift_compilation_flags'
1019

@@ -30,6 +39,9 @@ target 'FabricExample' do
3039
)
3140

3241
post_install do |installer|
42+
if ENV['CI'] == 'true'
43+
rnrepo_post_install(installer)
44+
end
3345
react_native_post_install(
3446
installer,
3547
config[:reactNativePath],

FabricExample/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@react-native/jest-preset": "0.85.0",
4949
"@react-native/metro-config": "0.85.0",
5050
"@react-native/typescript-config": "0.85.0",
51+
"@rnrepo/build-tools": "~0.1.3-beta.0",
5152
"@types/jest": "^29.5.13",
5253
"@types/react": "^19.2.0",
5354
"@types/react-test-renderer": "^19.1.0",

FabricExample/yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3101,6 +3101,13 @@ __metadata:
31013101
languageName: node
31023102
linkType: soft
31033103

3104+
"@rnrepo/build-tools@npm:~0.1.3-beta.0":
3105+
version: 0.1.3-beta.0
3106+
resolution: "@rnrepo/build-tools@npm:0.1.3-beta.0"
3107+
checksum: 10c0/83d2c2b05d87ab038d139c56b2e8ea1df071c41a51094a6464d9c7bc5794f25eb289b8b9298418e829d9ebfe723a77d5556fb1eaf69d87b25dda1f7d19d2d5fb
3108+
languageName: node
3109+
linkType: hard
3110+
31043111
"@sideway/address@npm:^4.1.5":
31053112
version: 4.1.5
31063113
resolution: "@sideway/address@npm:4.1.5"
@@ -3515,6 +3522,7 @@ __metadata:
35153522
"@react-navigation/native-stack": "link:../react-navigation/packages/native-stack/"
35163523
"@react-navigation/routers": "link:../react-navigation/packages/routers/"
35173524
"@react-navigation/stack": "link:../react-navigation/packages/stack/"
3525+
"@rnrepo/build-tools": "npm:~0.1.3-beta.0"
35183526
"@types/jest": "npm:^29.5.13"
35193527
"@types/react": "npm:^19.2.0"
35203528
"@types/react-test-renderer": "npm:^19.1.0"

0 commit comments

Comments
 (0)