diff --git a/.changeset/config.json b/.changeset/config.json index 51dc18f3..f6bc924a 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -15,7 +15,6 @@ "@callstack/brownfield-example-ios-app", "@callstack/brownfield-example-rn-app", "@callstack/brownfield-example-expo-app", - "@callstack/react-native-brownfield-tester-integrated", "@callstack/brownfield-gradle-plugin-react" ], "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 353b06e0..2e1b323d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,39 +50,6 @@ jobs: run: | yarn workspace @callstack/react-native-brownfield brownfield --version - android-tester-integrated: - name: Android road test (TesterIntegrated) - runs-on: ubuntu-latest - needs: build-lint - - steps: - - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - - - name: Setup - uses: ./.github/actions/setup - - - name: Prepare Android environment - uses: ./.github/actions/prepare-android - - - name: Restore Gradle cache - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-android-tester-integrated-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-android-tester-integrated-gradle- - - # == TesterIntegrated == - - - name: Generate Brownie stores - run: yarn run brownfield:codegen - - - name: Build integrated Android tester app - run: yarn run build:tester-integrated:android - android-androidapp-expo: name: Android road test (RNApp & AndroidApp - Expo) runs-on: ubuntu-latest @@ -115,77 +82,6 @@ jobs: rn-project-path: apps/RNApp rn-project-maven-path: com/rnapp/brownfieldlib - ios-tester-integrated: - name: iOS road test (TesterIntegrated) - runs-on: macos-26 - needs: build-lint - - env: - USE_CCACHE: 1 - CCACHE_DIR: ${{ github.workspace }}/.ios_ccache - CCACHE_BASEDIR: ${{ github.workspace }} - CCACHE_COMPRESS: '1' - - steps: - - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - - - name: Setup - uses: ./.github/actions/setup - - - name: Prepare iOS environment - uses: ./.github/actions/prepare-ios - - - name: Install ccache - run: brew install ccache - - - name: Enable ccache - run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH - - - name: Restore TesterIntegrated ccache - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 - with: - path: | - .ios_ccache - key: ${{ runner.os }}-tester-integrated-ios-ccache-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock', 'apps/TesterIntegrated/swift/SwiftExample.xcodeproj/project.pbxproj') }} - restore-keys: | - ${{ runner.os }}-tester-integrated-ios-ccache- - - # == TesterIntegrated == - - - name: Restore Pods cache (TesterIntegrated) - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 - with: - path: | - apps/TesterIntegrated/swift/Pods - key: ${{ runner.os }}-tester-integrated-ios-pods-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-tester-integrated-ios-pods- - - - name: Install pods (TesterIntegrated) - run: | - cd apps/TesterIntegrated/swift - pod install - - - name: Restore DerivedData cache (TesterIntegrated) - uses: actions/cache@v5 - with: - path: apps/TesterIntegrated/swift/build - key: ${{ runner.os }}-ios-tester-integrated-derived-data-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock', 'apps/TesterIntegrated/swift/SwiftExample.xcodeproj/project.pbxproj') }} - restore-keys: | - ${{ runner.os }}-ios-tester-integrated-derived-data- - - - name: Build integrated iOS tester app - run: | - yarn run build:tester-integrated:ios - - # ============== - - - name: Log ccache stats - uses: ./.github/actions/ccache-summary - with: - name: TesterIntegrated - ios-appleapp-vanilla: name: iOS road test (RNApp & AppleApp - Vanilla) runs-on: macos-26 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a57e51d2..21397448 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,10 +4,7 @@ Run `yarn` in the root of the repository to install all dependencies. -Depending on your needs, you may need to install CocoaPods in a subset of the below directories: - -- example React Native iOS app: `cd apps/RNApp/ios && pod install` -- integrated iOS tester app: `cd apps/TesterIntegrated/swift && pod install` +Depending on your needs, you may need to install CocoaPods in the example React Native iOS app: `cd apps/RNApp/ios && pod install`. ## Contributing changes @@ -27,8 +24,6 @@ We use [changesets](https://github.com/changesets/changesets) to make it easier - `brownfield:plugin:publish:local` - publishes the Brownfield Gradle plugin to your local Maven repository for testing purposes - `build:brownfield` - builds the React Native Brownfield package (`packages/react-native-brownfield`) _[Turbo]_ - `build:docs` - builds the documentation site (`docs/`) _[Turbo]_ -- `build:tester-integrated:android` - builds the Android integrated tester app (`apps/TesterIntegrated/android`) -- `build:tester-integrated:ios` - builds the iOS integrated tester app (`apps/TesterIntegrated/swift`) - `build:example:android-rn` - builds the example React Native app for Android (`apps/RNApp/android`) - `build:example:ios-rn` - builds the example React Native app for iOS (`apps/RNApp/ios`) - `build:example:android-consumer:expo` - builds the example native Android consumer (`apps/AndroidApp`) app's flavor consuming the Expo RN app (`apps/ExpoApp`) artifact diff --git a/apps/README.md b/apps/README.md index 1f930ad8..aac6b34c 100644 --- a/apps/README.md +++ b/apps/README.md @@ -10,4 +10,3 @@ This directory contains demo projects showcasing the usage of the `react-native- - `AppleApp` - the native iOS application that integrates the RNApp XCFramework package (a "consumer" of the RNApp library); it comes in two configurations: - `expo` - which uses the artifact produced from `ExpoApp` - `vanilla` - which uses the artifact produced from `RNApp` -- `TesterIntegrated` - a native tester application that integrates the native projects with and React Native project inside a single application, consuming the brownfield module directly, without packaging to an artifact; this is mostly useful for internal development purposes and is not as meaningful for end users of React Native Brownfield diff --git a/apps/TesterIntegrated/.gitignore b/apps/TesterIntegrated/.gitignore deleted file mode 100644 index cd9cba53..00000000 --- a/apps/TesterIntegrated/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions - -build diff --git a/apps/TesterIntegrated/App.tsx b/apps/TesterIntegrated/App.tsx deleted file mode 100644 index 94fc6cdf..00000000 --- a/apps/TesterIntegrated/App.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import './BrownfieldStore.brownie'; - -import { useStore } from '@callstack/brownie'; -import { useEffect } from 'react'; -import { StyleSheet, Text, View, Button, TextInput } from 'react-native'; - -import { - createNativeStackNavigator, - type NativeStackScreenProps, -} from '@react-navigation/native-stack'; -import ReactNativeBrownfield from '@callstack/react-native-brownfield'; -import { NavigationContainer } from '@react-navigation/native'; - -const getRandomValue = () => Math.round(Math.random() * 255); -const getRandomTheme = () => { - const primary = [getRandomValue(), getRandomValue(), getRandomValue()]; - const secondary = [ - 255 - (primary?.[0] || 0), - 255 - (primary?.[1] || 0), - 255 - (primary?.[2] || 0), - ]; - - return { - primary: `rgb(${primary[0]}, ${primary[1]}, ${primary[2]})`, - secondary: `rgb(${secondary[0]}, ${secondary[1]}, ${secondary[2]})`, - }; -}; - -type RootStackParamList = { - Home: { theme: { primary: string; secondary: string } }; -}; - -type HomeScreenProps = NativeStackScreenProps; - -const theme = getRandomTheme(); - -function HomeScreen({ navigation, route }: HomeScreenProps) { - const colors = route.params?.theme || theme; - const [counter, setState] = useStore('BrownfieldStore', (s) => s.counter); - const [user] = useStore('BrownfieldStore', (s) => s.user); - - useEffect(() => { - const unsubscribe = navigation.addListener('focus', () => { - const isFirstRoute = !navigation.canGoBack(); - ReactNativeBrownfield.setNativeBackGestureAndButtonEnabled(isFirstRoute); - }); - return unsubscribe; - }, [navigation]); - - return ( - - - React Native Screen - - - - Count: {counter} - - - - setState((prev) => ({ user: { ...prev.user, name: text } })) - } - placeholder="User name" - /> - -