Skip to content

Commit ffe0cbd

Browse files
authored
chore: upgrade to rspress v2 (#334)
* chore: upgrade to rspress v2 * fix: use file instead of dir for config and cli pages * fix: explicit files in brownfield * fix: gradle -> groovy * chore: add changeset
1 parent e8c9da7 commit ffe0cbd

File tree

8 files changed

+1090
-893
lines changed

8 files changed

+1090
-893
lines changed

.changeset/little-lions-brake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'rnef-docs': patch
3+
---
4+
5+
chore: upgrade rspress to 2.0.0-beta.6

pnpm-lock.yaml

Lines changed: 1069 additions & 878 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/docs/docs/_meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"label": "Getting Started"
66
},
77
{
8-
"type": "dir",
8+
"type": "file",
99
"name": "cli",
1010
"label": "CLI"
1111
},
1212
{
13-
"type": "dir",
13+
"type": "file",
1414
"name": "configuration",
1515
"label": "Configuration"
1616
},
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[
22
{
33
"name": "ios",
4+
"type": "file",
45
"label": "iOS"
56
},
67
{
78
"name": "android",
9+
"type": "file",
810
"label": "Android"
911
}
1012
]

website/docs/docs/brownfield/android.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ We need a special Gradle plugin to create an AAR that includes all dependencies.
2020

2121
1. Add the gradle plugin dependency to your `android/build.gradle`:
2222

23-
```gradle title="android/build.gradle" {3-10,15}
23+
```groovy title="android/build.gradle" {3-10,15}
2424
buildscript {
2525
repositories {
2626
google()
@@ -34,7 +34,7 @@ We need a special Gradle plugin to create an AAR that includes all dependencies.
3434

3535
1. Add the plugin to your `rnbrownfield/build.gradle.kts`:
3636

37-
```gradle title="rnbrownfield/build.gradle.kts" {4}
37+
```groovy title="rnbrownfield/build.gradle.kts" {4}
3838
plugins {
3939
id("com.android.library")
4040
id("org.jetbrains.kotlin.android")
@@ -50,7 +50,7 @@ We need a special Gradle plugin to create an AAR that includes all dependencies.
5050

5151
Add the required React Native dependencies to your `rnbrownfield/build.gradle.kts`:
5252

53-
```gradle title="rnbrownfield/build.gradle.kts" {2-3}
53+
```groovy title="rnbrownfield/build.gradle.kts" {2-3}
5454
dependencies {
5555
api("com.facebook.react:react-android:0.77.0")
5656
api("com.facebook.react:hermes-android:0.77.0")
@@ -130,7 +130,7 @@ class ReactNativeHostManager {
130130

131131
Update your `rnbrownfield/build.gradle.kts` to use Java 17:
132132

133-
```gradle title="rnbrownfield/build.gradle.kts" {3-4,7}
133+
```groovy title="rnbrownfield/build.gradle.kts" {3-4,7}
134134
android {
135135
compileOptions {
136136
sourceCompatibility = JavaVersion.VERSION_17
@@ -144,7 +144,7 @@ android {
144144

145145
Add build configuration fields:
146146

147-
```gradle title="rnbrownfield/build.gradle.kts" {4-5}
147+
```groovy title="rnbrownfield/build.gradle.kts" {4-5}
148148
android {
149149
defaultConfig {
150150
minSdk = 24
@@ -221,7 +221,7 @@ object RNViewFactory {
221221

222222
Add the Maven publish plugin to your `rnbrownfield/build.gradle.kts`:
223223

224-
```gradle title="rnbrownfield/build.gradle.kts" {5}
224+
```groovy title="rnbrownfield/build.gradle.kts" {5}
225225
plugins {
226226
id("com.android.library")
227227
id("org.jetbrains.kotlin.android")
@@ -232,7 +232,7 @@ plugins {
232232

233233
Configure the publishing settings:
234234

235-
```gradle title="rnbrownfield/build.gradle.kts"
235+
```groovy title="rnbrownfield/build.gradle.kts"
236236
publishing {
237237
publications {
238238
create<MavenPublication>("mavenAar") {
@@ -320,7 +320,7 @@ tasks.named("generateMetadataFileForMavenAarPublication") {
320320
321321
1. Add the dependency to your app's `build.gradle.kts`:
322322

323-
```gradle title="build.gradle.kts" {2}
323+
```groovy title="build.gradle.kts" {2}
324324
dependencies {
325325
implementation("com.callstack:rnbrownfield:0.0.1-local")
326326
}
@@ -408,4 +408,4 @@ class MainActivity : AppCompatActivity() {
408408

409409
Now you can run your app and test the React Native integration!
410410

411-
>Note: `brownfield-gradle-plugin` copies `.so` files to the `lib` folder. Make sure to add `**/*.so` to your .gitignore file, as to not commit these .so files. The reason is they are auto-generated each time.
411+
> Note: `brownfield-gradle-plugin` copies `.so` files to the `lib` folder. Make sure to add `**/*.so` to your .gitignore file, as to not commit these .so files. The reason is they are auto-generated each time.
File renamed without changes.
File renamed without changes.

website/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@
88
"preview": "rspress preview"
99
},
1010
"dependencies": {
11-
"@callstack/rspress-theme": "^0.0.2",
12-
"rspress": "^1.43.12",
11+
"@callstack/rspress-theme": "^0.0.3",
12+
"rspress": "^2.0.0-beta.6",
1313
"rspress-plugin-vercel-analytics": "^0.3.0"
1414
},
1515
"devDependencies": {
1616
"@types/node": "^18.11.17"
17-
},
18-
"packageManager": "[email protected]"
17+
}
1918
}

0 commit comments

Comments
 (0)