Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions apps/AndroidApp/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}

Expand Down Expand Up @@ -55,16 +54,13 @@ android {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
}
}

dependencies {
implementation("com.google.code.gson:gson:2.13.1")
implementation(libs.gson)
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
Expand Down
1 change: 0 additions & 1 deletion apps/AndroidApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
}
6 changes: 5 additions & 1 deletion apps/AndroidApp/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true

# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
Expand All @@ -24,3 +23,8 @@ kotlin.code.style=official
android.nonTransitiveRClass=true
# Enable Gradle's build cache
org.gradle.caching=true
android.onlyEnableUnitTestForTheTestedBuildType=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.dependency.excludeLibraryComponentsFromConstraints=true
15 changes: 8 additions & 7 deletions apps/AndroidApp/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[versions]
agp = "8.13.2"
agp = "9.1.0"
brownfieldlib = "0.0.1-SNAPSHOT"
kotlin = "2.2.21"
coreKtx = "1.17.0"
kotlin = "2.3.20"
coreKtx = "1.18.0"
junit = "4.13.2"
junitVersion = "1.3.0"
espressoCore = "3.7.0"
lifecycleRuntimeKtx = "2.6.1"
activityCompose = "1.8.0"
composeBom = "2024.09.00"
lifecycleRuntimeKtx = "2.10.0"
activityCompose = "1.13.0"
composeBom = "2026.03.01"
appcompat = "1.7.1"
fragmentCompose = "1.8.9"
material = "1.13.0"
gson = "2.13.2"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand All @@ -34,9 +35,9 @@ androidx-compose-material3 = { group = "androidx.compose.material3", name = "mat
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
androidx-fragment-compose = { group = "androidx.fragment", name = "fragment-compose", version.ref = "fragmentCompose" }
material = { module = "com.google.android.material:material", version.ref = "material" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

2 changes: 1 addition & 1 deletion apps/AndroidApp/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Thu Dec 11 23:54:21 CET 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions apps/RNApp/android/BrownfieldLib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ dependencies {
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.3.0")
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
api("com.facebook.react:react-android:0.82.1")
api("com.facebook.react:hermes-android:0.82.1")
api("com.facebook.react:react-android:0.85.0")
api("com.facebook.hermes:hermes-android:250829098.0.10")
}
4 changes: 2 additions & 2 deletions apps/RNApp/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ react {

/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// skip the bundling of the JS bundle and the assets. Default is "debug", "debugOptimized".
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]
// debuggableVariants = ["liteDebug", "liteDebugOptimized", "prodDebug", "prodDebugOptimized"]

/* Bundling */
// A list containing the node command and its flags. Default is just 'node'.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 0 additions & 3 deletions apps/RNApp/android/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/RNApp/android/gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions apps/RNApp/ios/RNApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
Expand Down
3 changes: 3 additions & 0 deletions apps/RNApp/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
preset: '@react-native/jest-preset',
};
24 changes: 13 additions & 11 deletions apps/RNApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,38 @@
"@callstack/react-native-brownfield": "workspace:^",
"@react-navigation/native": "^7.1.33",
"@react-navigation/native-stack": "^7.14.5",
"react": "19.1.1",
"react-native": "0.82.1",
"react": "19.2.3",
"react-native": "0.85.0",
"react-native-safe-area-context": "^5.6.2",
"react-native-screens": "^4.23.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "20.0.0",
"@react-native-community/cli-platform-android": "20.0.0",
"@react-native-community/cli-platform-ios": "20.0.0",
"@react-native/babel-preset": "0.82.1",
"@react-native/metro-config": "0.82.1",
"@react-native/typescript-config": "0.82.1",
"@react-native-community/cli": "20.1.0",
"@react-native-community/cli-platform-android": "20.1.0",
"@react-native-community/cli-platform-ios": "20.1.0",
"@react-native/babel-preset": "0.85.0",
"@react-native/eslint-config": "0.85.0",
"@react-native/jest-preset": "0.85.0",
"@react-native/metro-config": "0.85.0",
"@react-native/typescript-config": "0.85.0",
"@types/jest": "^30.0.0",
"@types/react": "^19.1.1",
"@types/react": "^19.2.0",
"@types/react-test-renderer": "^19.1.0",
"eslint": "^9.39.3",
"jest": "^30.2.0",
"prettier": "^3.8.1",
"react-native-monorepo-config": "^0.3.3",
"react-test-renderer": "19.1.1",
"react-test-renderer": "19.2.3",
"typescript": "^5.9.3"
},
"brownie": {
"kotlin": "./android/BrownfieldLib/src/main/java/com/rnapp/brownfieldlib/Generated/",
"kotlinPackageName": "com.rnapp.brownfieldlib"
},
"engines": {
"node": ">=20"
"node": ">= 22.11.0"
}
}
122 changes: 104 additions & 18 deletions docs/docs/docs/getting-started/android.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PackageManagerTabs } from '@theme';
import { PackageManagerTabs, Tabs, Tab } from '@theme';

# Android Integration

Expand Down Expand Up @@ -61,24 +61,110 @@ react {

## 3. Add React Native Dependencies

Add to `reactnativeapp/build.gradle.kts`:
Add the code below to `reactnativeapp/build.gradle.kts` based on your React Native version.

```kotlin
dependencies {
// Match your version of React Native. For example, for React Native 0.83.x:
api("com.facebook.react:react-android:0.83.0")

// Hermes artifact - choose based on your React Native version
// For React Native 0.84+:
api("com.facebook.hermes:hermes-android:0.15.1")
// For React Native 0.83.2 - 0.83.x:
// api("com.facebook.hermes:hermes-android:0.14.1")
// For React Native 0.83.0 and 0.83.1:
// api("com.facebook.hermes:hermes-android:0.14.0")
// For React Native 0.82.x and below:
// api("com.facebook.react:hermes-android:<RN_VERSION>")
}
```
<Tabs>
<Tab label="0.85.0">
```kotlin
dependencies {
// Match your version of React Native below
api("com.facebook.react:react-android:0.85.0")

// Use the below for Hermes V1
api("com.facebook.hermes:hermes-android:250829098.0.10")
// Alternatively, use the below for legacy Hermes
// api("com.facebook.hermes:hermes-android:0.16.0")
}
```
</Tab>

<Tab label="0.84.1">
```kotlin
dependencies {
// Match your version of React Native below
api("com.facebook.react:react-android:0.84.1")

// Use the below for Hermes V1
api("com.facebook.hermes:hermes-android:250829098.0.9")
// Alternatively, use the below for legacy Hermes
// api("com.facebook.hermes:hermes-android:0.15.1")
}
```
</Tab>

<Tab label="0.84.0">
```kotlin
dependencies {
// Match your version of React Native below
api("com.facebook.react:react-android:0.84.0")

// Use the below for Hermes V1
api("com.facebook.hermes:hermes-android:250829098.0.7")
// Alternatively, use the below for legacy Hermes
// api("com.facebook.hermes:hermes-android:0.14.1")
}
```
</Tab>

<Tab label="0.83.2 - 0.83.4">
```kotlin
dependencies {
// Match your version of React Native below
api("com.facebook.react:react-android:<RN_VERSION>")
// e.g., for RN 0.83.4
// api("com.facebook.react:react-android:0.83.4")

// Use the below for Hermes V1
api("com.facebook.hermes:hermes-android:250829098.0.4")
// Alternatively, use the below for legacy Hermes
// api("com.facebook.hermes:hermes-android:0.14.1")
}
```
</Tab>

<Tab label="0.83.1">
```kotlin
dependencies {
// Match your version of React Native below
api("com.facebook.react:react-android:0.83.1")

// Use the below for Hermes V1
api("com.facebook.hermes:hermes-android:250829098.0.4")
// Alternatively, use the below for legacy Hermes
// api("com.facebook.hermes:hermes-android:0.14.0")
}
```
</Tab>

<Tab label="0.83.0">
```kotlin
dependencies {
// Match your version of React Native below
api("com.facebook.react:react-android:0.83.0")

// Use the below for Hermes V1
api("com.facebook.hermes:hermes-android:250829098.0.4")
// Alternatively, use the below for legacy Hermes
// api("com.facebook.hermes:hermes-android:0.14.0")
}
```
</Tab>

<Tab label="0.82.x and below">
```kotlin
dependencies {
// Match your version of React Native below
api("com.facebook.react:react-android:<RN_VERSION>")
api("com.facebook.react:hermes-android:<RN_VERSION>")

// e.g., for RN 0.82.0
// api("com.facebook.react:react-android:0.82.0")
// api("com.facebook.react:hermes-android:0.82.0")
}
```
</Tab>

</Tabs>

:::warning Important
Make sure the **React Native version** matches the version in your project's `package.json`.
Expand Down
8 changes: 7 additions & 1 deletion docs/docs/docs/getting-started/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ React Native Brownfield is a library that simplifies integrating React Native in

| Tested React Native Version | React Native Brownfield Version |
| --------------------------- | ------------------------------- |
| 0.83.x | 3.x |
| 0.83.x, 0.84.x, 0.85.x | 3.x |
| 0.81.x, 0.82.x | 2.x, 3.x |
| 0.78.x | ^1.2.0 |

## Expo Version Compatibility

| Tested Expo Version | React Native Brownfield Version |
| ------------------- | ------------------------------- |
| 54.x, 55.x | 3.x |

## Cross-package Compatibility

For all versions >= `3.0.0`, the packages in the Brownfield ecosystem are guaranteed to be compatible with each other within the same major version (e.g. `3.*.*` brownfield CLI package is compatible with all versions `3.*.*` of other packages).
Loading
Loading