Skip to content

Commit 385c86d

Browse files
committed
Merge branch 'main' of github.com:callstack/react-native-brownfield into feat/expo-updates
2 parents b650962 + eab53d9 commit 385c86d

57 files changed

Lines changed: 2809 additions & 988 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/crisp-crabs-mate.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@callstack/react-native-brownfield': patch
3+
'@callstack/brownfield-navigation': patch
4+
'@callstack/brownie': patch
5+
'@callstack/brownfield-cli': patch
6+
---
7+
8+
fix securiy vulnerabilities

apps/AndroidApp/app/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
22
alias(libs.plugins.android.application)
3-
alias(libs.plugins.kotlin.android)
43
alias(libs.plugins.kotlin.compose)
54
}
65

@@ -55,9 +54,6 @@ android {
5554
sourceCompatibility = JavaVersion.VERSION_17
5655
targetCompatibility = JavaVersion.VERSION_17
5756
}
58-
kotlinOptions {
59-
jvmTarget = "17"
60-
}
6157
buildFeatures {
6258
compose = true
6359
}
@@ -71,7 +67,6 @@ android {
7167

7268
dependencies {
7369
implementation(libs.gson)
74-
7570
implementation(libs.androidx.core.ktx)
7671
implementation(libs.androidx.lifecycle.runtime.ktx)
7772
implementation(libs.androidx.activity.compose)

apps/AndroidApp/app/src/main/java/com/callstack/brownfield/android/example/MainActivity.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.callstack.brownfield.android.example
33
import com.callstack.brownie.registerStoreIfNeeded
44
import android.content.Intent
55
import android.content.res.Configuration
6+
import android.os.Build
67
import android.os.Bundle
78
import android.widget.Toast
89
import androidx.activity.compose.setContent
@@ -131,6 +132,15 @@ fun ReactNativeView(
131132
ReactNativeFragmentArgNames.ARG_MODULE_NAME,
132133
ReactNativeConstants.MAIN_MODULE_NAME
133134
)
135+
putBundle(
136+
ReactNativeFragmentArgNames.ARG_LAUNCH_OPTIONS,
137+
Bundle().apply {
138+
putString(
139+
"nativeOsVersionLabel",
140+
"Android ${Build.VERSION.RELEASE}"
141+
)
142+
}
143+
)
134144
}
135145
)
136146
}

apps/AndroidApp/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
33
alias(libs.plugins.android.application) apply false
4-
alias(libs.plugins.kotlin.android) apply false
54
alias(libs.plugins.kotlin.compose) apply false
65
}

apps/AndroidApp/gradle.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1515
# Android operating system, and which are packaged with your app's APK
1616
# https://developer.android.com/topic/libraries/support-library/androidx-rn
1717
android.useAndroidX=true
18-
1918
# Kotlin code style for this project: "official" or "obsolete":
2019
kotlin.code.style=official
2120
# Enables namespacing of each library's R class so that its R class includes only the
@@ -24,3 +23,8 @@ kotlin.code.style=official
2423
android.nonTransitiveRClass=true
2524
# Enable Gradle's build cache
2625
org.gradle.caching=true
26+
android.onlyEnableUnitTestForTheTestedBuildType=false
27+
android.uniquePackageNames=false
28+
android.dependency.useConstraints=true
29+
android.r8.strictFullModeForKeepRules=false
30+
android.dependency.excludeLibraryComponentsFromConstraints=true

apps/AndroidApp/gradle/libs.versions.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
[versions]
2-
agp = "8.13.2"
2+
agp = "9.1.0"
33
brownfieldlib = "0.0.1-SNAPSHOT"
44
gson = "2.13.1"
5-
kotlin = "2.2.21"
6-
coreKtx = "1.17.0"
5+
kotlin = "2.3.20"
6+
coreKtx = "1.18.0"
77
junit = "4.13.2"
88
junitVersion = "1.3.0"
99
espressoCore = "3.7.0"
10-
lifecycleRuntimeKtx = "2.6.1"
11-
activityCompose = "1.8.0"
12-
composeBom = "2024.09.00"
10+
lifecycleRuntimeKtx = "2.10.0"
11+
activityCompose = "1.13.0"
12+
composeBom = "2026.03.01"
1313
appcompat = "1.7.1"
1414
fragmentCompose = "1.8.9"
1515
material = "1.13.0"
16+
gson = "2.13.2"
1617

1718
[libraries]
1819
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -36,9 +37,9 @@ androidx-compose-material3 = { group = "androidx.compose.material3", name = "mat
3637
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
3738
androidx-fragment-compose = { group = "androidx.fragment", name = "fragment-compose", version.ref = "fragmentCompose" }
3839
material = { module = "com.google.android.material:material", version.ref = "material" }
40+
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
3941

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

apps/AndroidApp/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#Thu Dec 11 23:54:21 CET 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

apps/AppleApp/Brownfield Apple App/components/ContentView.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,23 @@ struct ContentView: View {
2323

2424
MessagesView()
2525

26-
ReactNativeView(moduleName: "main")
26+
ReactNativeView(
27+
moduleName: "main",
28+
initialProperties: [
29+
"nativeOsVersionLabel":
30+
"\(UIDevice.current.systemName) \(UIDevice.current.systemVersion)"
31+
]
32+
)
2733
.navigationBarHidden(true)
2834
.clipShape(RoundedRectangle(cornerRadius: 16))
2935
.background(Color(UIColor.systemBackground))
36+
37+
Button("Stop React Native") {
38+
ReactNativeBrownfield.shared.stopReactNative()
39+
}
40+
.buttonStyle(PlainButtonStyle())
41+
.padding(.top)
42+
.foregroundColor(.red)
3043
}
3144
.frame(maxWidth: .infinity, maxHeight: .infinity)
3245
.padding(16)

apps/ExpoApp54/RNApp.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,24 @@ import Counter from './components/counter';
66

77
import { checkAndFetchUpdate } from './utils/expo-rn-updates';
88

9-
export default function RNApp() {
9+
type RNAppProps = {
10+
nativeOsVersionLabel?: string;
11+
};
12+
13+
export default function RNApp({ nativeOsVersionLabel }: RNAppProps) {
1014
return (
1115
<SafeAreaView style={styles.container}>
1216
<Text style={styles.title}>Expo React Native Brownfield</Text>
1317

18+
{nativeOsVersionLabel ? (
19+
<Text
20+
style={styles.nativeOsVersionLabel}
21+
accessibilityLabel="Native OS version"
22+
>
23+
{nativeOsVersionLabel}
24+
</Text>
25+
) : null}
26+
1427
<View style={styles.content}>
1528
<Counter />
1629

@@ -39,6 +52,12 @@ const styles = StyleSheet.create({
3952
fontWeight: 'bold',
4053
textAlign: 'center',
4154
},
55+
nativeOsVersionLabel: {
56+
fontSize: 11,
57+
opacity: 0.75,
58+
textAlign: 'center',
59+
marginTop: 4,
60+
},
4261
content: {
4362
flex: 1,
4463
justifyContent: 'center',

apps/ExpoApp55/RNApp.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,24 @@ import { checkAndFetchUpdate } from './src/utils/expo-rn-updates';
55

66
import Counter from './src/components/counter';
77

8-
export default function RNApp() {
8+
type RNAppProps = {
9+
nativeOsVersionLabel?: string;
10+
};
11+
12+
export default function RNApp({ nativeOsVersionLabel }: RNAppProps) {
913
return (
1014
<SafeAreaView style={styles.container}>
1115
<Text style={styles.title}>Expo React Native Brownfield</Text>
1216

17+
{nativeOsVersionLabel ? (
18+
<Text
19+
style={styles.nativeOsVersionLabel}
20+
accessibilityLabel="Native OS version"
21+
>
22+
{nativeOsVersionLabel}
23+
</Text>
24+
) : null}
25+
1326
<View style={styles.content}>
1427
<Counter />
1528

@@ -38,6 +51,12 @@ const styles = StyleSheet.create({
3851
fontWeight: 'bold',
3952
textAlign: 'center',
4053
},
54+
nativeOsVersionLabel: {
55+
fontSize: 11,
56+
opacity: 0.75,
57+
textAlign: 'center',
58+
marginTop: 4,
59+
},
4160
content: {
4261
flex: 1,
4362
justifyContent: 'center',

0 commit comments

Comments
 (0)