diff --git a/.github/actions/ccache-summary/action.yml b/.github/actions/ccache-summary/action.yml new file mode 100644 index 00000000..52df8958 --- /dev/null +++ b/.github/actions/ccache-summary/action.yml @@ -0,0 +1,14 @@ +name: 'ccache statistics' +description: 'Print job summary with selected ccache statistics' + +inputs: + name: + description: 'Label to print in summary' + required: true + +runs: + using: composite + steps: + - name: Log ccache stats + run: ccache -s > $GITHUB_STEP_SUMMARY + shell: bash diff --git a/.github/actions/prepare-android/action.yml b/.github/actions/prepare-android/action.yml new file mode 100644 index 00000000..9ef2eaae --- /dev/null +++ b/.github/actions/prepare-android/action.yml @@ -0,0 +1,43 @@ +name: Prepare Android environment +description: Prepare Android environment and set up the project + +inputs: + free-disk-space: + description: 'Whether to free disk space on the runner' + required: false + default: 'true' + + run-yarn-build: + description: 'Whether to run yarn build' + required: false + default: 'true' + +runs: + using: composite + steps: + - name: Validate Gradle Wrapper + uses: gradle/actions/wrapper-validation@6f229686ee4375cc4a86b2514c89bac4930e82c4 # v5 + + - name: Setup Java + uses: actions/setup-java@5d7b2146334bacf88728daaa70414a99f5164e0f # v5 + with: + distribution: 'zulu' + java-version: '17' + + - name: Free Disk Space (Ubuntu) + if: inputs.free-disk-space == 'true' + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + with: + tool-cache: false + + android: false + dotnet: true + haskell: true + large-packages: false + docker-images: true + swap-storage: false + + - name: Build packages + if: inputs.run-yarn-build == 'true' + run: yarn build + shell: bash diff --git a/.github/actions/prepare-ios/action.yml b/.github/actions/prepare-ios/action.yml new file mode 100644 index 00000000..2fd43b24 --- /dev/null +++ b/.github/actions/prepare-ios/action.yml @@ -0,0 +1,27 @@ +name: Prepare iOS environment +description: Prepare iOS environment and set up the project + +inputs: + run-yarn-build: + description: 'Whether to run yarn build' + required: false + default: 'true' + +runs: + using: composite + steps: + - name: Use appropriate Xcode version + uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 + with: + xcode-version: '26' + + - name: Setup Ruby + uses: ruby/setup-ruby@5dd816ae0186f20dfa905997a64104db9a8221c7 # v1.280.0 + with: + ruby-version: '3.2' + bundler-cache: true + + - name: Build packages + if: inputs.run-yarn-build == 'true' + run: yarn build + shell: bash diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 0a1c0b15..942b1d3e 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -1,6 +1,12 @@ name: Setup description: Setup Node.js and install dependencies +inputs: + restore-turbo-cache: + description: 'Whether to restore the Turbo cache' + required: false + default: 'true' + runs: using: composite steps: @@ -10,7 +16,12 @@ runs: node-version: 'lts/*' cache: 'yarn' - - name: Restore turbo cache + - name: Install dependencies + run: yarn install + shell: bash + + - name: Restore Turbo cache + if: inputs.restore-turbo-cache == 'true' uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 with: path: | @@ -20,7 +31,3 @@ runs: key: ${{ runner.os }}-turbo-${{ hashFiles('.turbo', '**/.turbo') }} restore-keys: | ${{ runner.os }}-turbo- - - - name: Install dependencies - run: yarn install - shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 509009ea..34cd2aeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,12 +30,12 @@ jobs: - name: Typecheck files run: yarn typecheck - - name: Test Brownfield CLI + - name: Test Brownfield CLI (version) run: | yarn workspace @callstack/react-native-brownfield brownfield --version - android: - name: 'Android: integrated tester & integration workflow with CLI' + android-tester-integrated: + name: Android road test (TesterIntegrated) runs-on: ubuntu-latest needs: build-lint @@ -43,49 +43,11 @@ jobs: - name: Checkout uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@6f229686ee4375cc4a86b2514c89bac4930e82c4 # v5 - - - name: Setup Java - uses: actions/setup-java@5d7b2146334bacf88728daaa70414a99f5164e0f # v5 - with: - distribution: 'zulu' - java-version: '17' - - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: false - - android: false - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - - name: Setup Node.js - uses: actions/setup-node@65d868f8d4d85d7d4abb7de0875cde3fcc8798f5 # v6 - with: - node-version: 'lts/*' - cache: 'yarn' - - - name: Install dependencies - run: yarn install - - - name: Build packages - run: yarn build + - name: Setup + uses: ./.github/actions/setup - - name: Restore android build cache - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 - with: - path: | - apps/TesterIntegrated/kotlin/build - apps/TesterIntegrated/kotlin/app/.cxx - apps/TesterIntegrated/kotlin/app/build - key: ${{ runner.os }}-tester-android-build-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-tester-android-build- + - name: Prepare Android environment + uses: ./.github/actions/prepare-android - name: Restore Gradle cache uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 @@ -93,11 +55,11 @@ jobs: path: | ~/.gradle/caches ~/.gradle/wrapper - key: ${{ runner.os }}-tester-integrated-android-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + key: ${{ runner.os }}-android-tester-integrated-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | - ${{ runner.os }}-tester-integrated-android-gradle- + ${{ runner.os }}-android-tester-integrated-gradle- - # == IntegratedTester == + # == TesterIntegrated == - name: Generate Brownie stores run: yarn run brownfield:codegen @@ -105,6 +67,31 @@ jobs: - name: Build integrated Android tester app run: yarn run build:tester-integrated:android + android-rnapp-androidapp: + name: Android road test (RNApp & AndroidApp) + 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-rnapp-androidapp-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-android-rnapp-androidapp-gradle- + # == RNApp == - name: Package AAR with the Brownfield CLI @@ -129,65 +116,133 @@ jobs: run: | yarn run build:example:android-consumer - ios: - name: Integrated tester iOS App - runs-on: macos-latest + ios-tester-integrated: + name: iOS road test (TesterIntegrated) + runs-on: macos-26 needs: build-lint + env: &ios_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: Use appropriate Xcode version - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 - with: - xcode-version: '16' + - name: Setup + uses: ./.github/actions/setup - - name: Setup Node.js - uses: actions/setup-node@65d868f8d4d85d7d4abb7de0875cde3fcc8798f5 # v6 - with: - node-version: 'lts/*' - cache: 'yarn' + - name: Prepare iOS environment + uses: ./.github/actions/prepare-ios - - name: Setup Ruby - uses: ruby/setup-ruby@5dd816ae0186f20dfa905997a64104db9a8221c7 # v1.280.0 - with: - ruby-version: '3.2' - bundler-cache: true + - name: Install ccache + run: brew install ccache - - name: Install dependencies - run: yarn install + - name: Enable ccache + run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH - - name: Build packages - run: yarn build + - 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- - - name: Restore Pods cache + # == TesterIntegrated == + + - name: Restore Pods cache (TesterIntegrated) uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 with: path: | apps/TesterIntegrated/swift/Pods - key: ${{ runner.os }}-tester-ios-pods-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock') }} + key: ${{ runner.os }}-tester-integrated-ios-pods-${{ hashFiles('apps/TesterIntegrated/swift/Podfile.lock') }} restore-keys: | - ${{ runner.os }}-tester-ios-pods- + ${{ runner.os }}-tester-integrated-ios-pods- - - name: Install pods + - name: Install pods (TesterIntegrated) run: | cd apps/TesterIntegrated/swift pod install - # == IntegratedTester == + - 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-rnapp-appleapp: + name: iOS road test (RNApp & AppleApp) + runs-on: macos-26 + needs: build-lint + + env: *ios_env + + 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 RNApp & AppleApp ccache + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 + with: + path: | + .ios_ccache + key: ${{ runner.os }}-rnapp-appleapp-ios-ccache-${{ hashFiles('apps/RNApp/ios/Podfile.lock', 'apps/RNApp/ios/RNApp.xcodeproj/project.pbxproj', 'apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj') }} + restore-keys: | + ${{ runner.os }}-rnapp-appleapp-ios-ccache- + # == RNApp == + - name: Restore Pods cache (RNApp) + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 + with: + path: | + apps/RNApp/ios/Pods + key: ${{ runner.os }}-rnapp-ios-pods-${{ hashFiles('apps/RNApp/ios/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-rnapp-ios-pods- + - name: Install pods (RNApp) run: | cd apps/RNApp/ios pod install + - name: Restore DerivedData cache (RNApp) + uses: actions/cache@v5 + with: + path: apps/RNApp/ios/build + key: ${{ runner.os }}-ios-rnapp-derived-data-${{ hashFiles('apps/RNApp/ios/Podfile.lock', 'apps/RNApp/ios/RNApp.xcodeproj/project.pbxproj') }} + restore-keys: | + ${{ runner.os }}-ios-rnapp-derived-data- + - name: Package iOS framework with the Brownfield CLI run: | cd apps/RNApp @@ -198,3 +253,10 @@ jobs: - name: Build Brownfield iOS native app run: | yarn run build:example:ios-consumer + + # ============== + + - name: Log ccache stats + uses: ./.github/actions/ccache-summary + with: + name: RNApp & AppleApp diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 4d966256..ea097e95 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -22,18 +22,13 @@ jobs: steps: - name: Checkout uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - with: - fetch-depth: 0 # Not needed if lastUpdated is not enabled + - name: Setup uses: ./.github/actions/setup - name: Setup Pages uses: actions/configure-pages@d5606572c479bee637007364c6b4800ac4fc8573 # v5 - - name: Install dependencies - working-directory: docs - run: yarn install - - name: Build with Rspress working-directory: docs run: | diff --git a/.github/workflows/gradle-plugin-lint.yml b/.github/workflows/gradle-plugin-lint.yml index c0159002..8eb4fcdd 100644 --- a/.github/workflows/gradle-plugin-lint.yml +++ b/.github/workflows/gradle-plugin-lint.yml @@ -12,17 +12,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository + - name: Checkout uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@6f229686ee4375cc4a86b2514c89bac4930e82c4 # v5 - - - name: Set up JDK - uses: actions/setup-java@5d7b2146334bacf88728daaa70414a99f5164e0f # v5 + - name: Prepare Android environment + uses: ./.github/actions/prepare-android with: - distribution: temurin - java-version: 17 + free-disk-space: 'false' + run-yarn-build: 'false' - name: Restore Gradle cache uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19449179..6fa14d8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,8 @@ concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: release: + environment: + name: release permissions: contents: write id-token: write @@ -16,16 +18,13 @@ jobs: name: Release runs-on: ubuntu-latest steps: - - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 - - name: Setup Node.js 20 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + - name: Setup + uses: ./.github/actions/setup with: - node-version: 20 - - - name: Install Dependencies - run: yarn + restore-turbo-cache: 'false' # in release workflow, build from scratch - name: Create Release Pull Request or Publish to NPM uses: changesets/action@e9cc34b540dd3ad1b030c57fd97269e8f6ad905a # v1.4.9 @@ -34,7 +33,3 @@ jobs: publish: yarn publish-packages commit: 'chore(release): version packages' title: 'chore(release): version packages' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_CONFIG_PROVENANCE: true - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2b78b73a..49203933 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,18 +18,18 @@ We use [changesets](https://github.com/changesets/changesets) to make it easier ## Scripts -- `lint` - runs linting on all JS/TS source files in the monorepo *[Turbo]* +- `lint` - runs linting on all JS/TS source files in the monorepo *[Turbo]* - `gradle-plugin:lint` - runs linting on the Brownfield Gradle plugin source code -- `typecheck` - runs TypeScript type checking on all TS source files in the monorepo *[Turbo]* -- `build` - runs all `build*` tasks in the Turbo repo - see below for more details *[Turbo]* +- `typecheck` - runs TypeScript type checking on all TS source files in the monorepo *[Turbo]* +- `build` - runs all `build*` tasks in the Turbo repo - see below for more details *[Turbo]* - `dev` - runs all `dev` tasks in all workspaces - `release` - releases a new version of React Native Brownfield package using `release-it` - `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`) *[Turbo]* -- `build:tester-integrated:ios` - builds the iOS integrated tester app (`apps/TesterIntegrated/swift`) *[Turbo]* -- `build:example:android-rn` - builds the example React Native app for Android (`apps/RNApp/android`) *[Turbo]* -- `build:example:ios-rn` - builds the example React Native app for iOS (`apps/RNApp/ios`) *[Turbo]* -- `build:example:android-consumer` - builds the example native Android consumer app (`apps/AndroidApp`) *[Turbo]* -- `build:example:ios-consumer` - builds the example native Apple consumer app (`apps/AppleApp`) *[Turbo]* \ No newline at end of file +- `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` - builds the example native Android consumer app (`apps/AndroidApp`) +- `build:example:ios-consumer` - builds the example native Apple consumer app (`apps/AppleApp`) \ No newline at end of file diff --git a/apps/AndroidApp/gradle.properties b/apps/AndroidApp/gradle.properties index 20e2a015..2d74388d 100644 --- a/apps/AndroidApp/gradle.properties +++ b/apps/AndroidApp/gradle.properties @@ -20,4 +20,6 @@ kotlin.code.style=official # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true +# Enable Gradle's build cache +org.gradle.caching=true diff --git a/apps/AndroidApp/turbo.json b/apps/AndroidApp/turbo.json deleted file mode 100644 index 17d8067a..00000000 --- a/apps/AndroidApp/turbo.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://turbo.build/schema.json", - "extends": ["//"], - "tasks": { - "build:example:android-consumer": { - "env": ["JAVA_HOME", "ANDROID_NDK", "ANDROID_SDK", "ANDROID_HOME"], - "inputs": [ - "apps/AndroidApp/app", - "apps/AndroidApp/build.gradle", - "apps/AndroidApp/settings.gradle", - "~/.m2/repository/com/rnapp/brownfieldlib/**/*.aar" - ], - "outputs": ["app/build"] - } - } -} diff --git a/apps/AppleApp/turbo.json b/apps/AppleApp/turbo.json deleted file mode 100644 index 003cc62e..00000000 --- a/apps/AppleApp/turbo.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://turbo.build/schema.json", - "extends": ["//"], - "tasks": { - "build:example:ios-consumer": { - "inputs": [ - "apps/AppleApp/Brownfield Apple App", - "apps/AppleApp/Brownfield Apple App.xcodeproj", - "apps/RNApp/ios/out/Release/*.xcframework" - ], - "outputs": ["build"] - } - } -} diff --git a/apps/RNApp/android/gradle.properties b/apps/RNApp/android/gradle.properties index 9afe6159..a55711cc 100644 --- a/apps/RNApp/android/gradle.properties +++ b/apps/RNApp/android/gradle.properties @@ -42,3 +42,6 @@ hermesEnabled=true # This allows your app to draw behind system bars for an immersive UI. # Note: Only works with ReactActivity and should not be used with custom Activity. edgeToEdgeEnabled=false + +# Enable Gradle's build cache +org.gradle.caching=true diff --git a/apps/RNApp/package.json b/apps/RNApp/package.json index a4a86fbb..584e6764 100644 --- a/apps/RNApp/package.json +++ b/apps/RNApp/package.json @@ -7,9 +7,9 @@ "ios": "react-native run-ios", "build:example:android-rn": "react-native build-android", "build:example:ios-rn": "react-native build-ios", - "brownfield:package:android": "brownfield package:android --module-name :BrownfieldLib --variant release --verbose", - "brownfield:publish:android": "brownfield publish:android --module-name :BrownfieldLib --verbose", - "brownfield:package:ios": "brownfield package:ios --scheme BrownfieldLib --configuration Release --verbose", + "brownfield:package:android": "brownfield package:android --module-name :BrownfieldLib --variant release", + "brownfield:publish:android": "brownfield publish:android --module-name :BrownfieldLib", + "brownfield:package:ios": "brownfield package:ios --scheme BrownfieldLib --configuration Release", "lint": "eslint .", "start": "react-native start", "test": "jest" diff --git a/apps/RNApp/turbo.json b/apps/RNApp/turbo.json deleted file mode 100644 index 48a53088..00000000 --- a/apps/RNApp/turbo.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://turbo.build/schema.json", - "extends": ["//"], - "tasks": { - "build:example:android-rn": { - "dependsOn": ["build:brownfield"], - "env": ["JAVA_HOME", "ANDROID_NDK", "ANDROID_SDK", "ANDROID_HOME"], - "inputs": [ - "apps/RNApp/package.json", - "apps/RNApp/android", - "!apps/RNApp/android/.gradle", - "!apps/RNApp/android/build", - "!apps/RNApp/android/app/build" - ], - "outputs": [] - }, - "build:example:ios-rn": { - "dependsOn": ["build:brownfield"], - "env": ["RCT_NEW_ARCH_ENABLED"], - "inputs": [ - "apps/RNApp/package.json", - "apps/RNApp/ios", - "!apps/RNApp/ios/build", - "!apps/RNApp/ios/Pods" - ], - "outputs": [] - } - } -} diff --git a/apps/TesterIntegrated/kotlin/gradle.properties b/apps/TesterIntegrated/kotlin/gradle.properties index f8b372be..02151414 100644 --- a/apps/TesterIntegrated/kotlin/gradle.properties +++ b/apps/TesterIntegrated/kotlin/gradle.properties @@ -31,3 +31,6 @@ newArchEnabled=true # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. hermesEnabled=true + +# Enable Gradle's build cache +org.gradle.caching=true diff --git a/apps/TesterIntegrated/turbo.json b/apps/TesterIntegrated/turbo.json deleted file mode 100644 index a1606ea4..00000000 --- a/apps/TesterIntegrated/turbo.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://turbo.build/schema.json", - "extends": ["//"], - "tasks": { - "build:tester-integrated:android": { - "dependsOn": ["build:brownfield"], - "env": ["JAVA_HOME", "ANDROID_NDK", "ANDROID_SDK", "ANDROID_HOME"], - "inputs": [ - "apps/TesterIntegrated/package.json", - "apps/TesterIntegrated/kotlin", - "!apps/TesterIntegrated/kotlin/.gradle", - "!apps/TesterIntegrated/kotlin/build", - "!apps/TesterIntegrated/kotlin/app/build" - ], - "outputs": [] - }, - "build:tester-integrated:ios": { - "dependsOn": ["build:brownfield"], - "env": ["RCT_NEW_ARCH_ENABLED"], - "inputs": [ - "apps/TesterIntegrated/package.json", - "apps/TesterIntegrated/swift", - "!apps/TesterIntegrated/swift/build", - "!apps/TesterIntegrated/swift/Pods" - ], - "outputs": [] - } - } -} diff --git a/gradle-plugins/react/brownfield/gradle.properties b/gradle-plugins/react/brownfield/gradle.properties index 800ce244..55561975 100644 --- a/gradle-plugins/react/brownfield/gradle.properties +++ b/gradle-plugins/react/brownfield/gradle.properties @@ -9,3 +9,6 @@ DESCRIPTION=Helps you generate Fat Aar for React Native Brownfield Projects GITHUB_URL=https://github.com/callstack/react-native-brownfield/ SCM_CONNECTION=scm:git:git://github.com/callstack/react-native-brownfield.git SCM_DEV_CONNECTION=scm:git:ssh://git@github.com:callstack/react-native-brownfield.git + +# Enable Gradle's build cache +org.gradle.caching=true diff --git a/package.json b/package.json index 746f8e92..63862f8b 100644 --- a/package.json +++ b/package.json @@ -18,12 +18,6 @@ "brownfield:plugin:publish:local": "bash ./gradle-plugins/publish-to-maven-local.sh", "build:brownfield": "turbo run build:brownfield", "build:docs": "turbo run build:docs", - "build:tester-integrated:android": "turbo run build:tester-integrated:android", - "build:tester-integrated:ios": "turbo run build:tester-integrated:ios", - "build:example:android-rn": "turbo run build:example:android-rn", - "build:example:ios-rn": "turbo run build:example:ios-rn", - "build:example:android-consumer": "turbo run build:example:android-consumer", - "build:example:ios-consumer": "turbo run build:example:ios-consumer", "generate:store": "node --experimental-strip-types --no-warnings ./scripts/generate-store.ts" }, "resolutions": { diff --git a/packages/brownie/turbo.json b/packages/brownie/turbo.json new file mode 100644 index 00000000..2c795536 --- /dev/null +++ b/packages/brownie/turbo.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + "build": { + "inputs": ["src/**/*"], + "outputs": ["lib/**"] + } + } +} diff --git a/packages/cli/turbo.json b/packages/cli/turbo.json new file mode 100644 index 00000000..3bafb127 --- /dev/null +++ b/packages/cli/turbo.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + "build": { + "inputs": ["src/**/*"], + "outputs": ["dist/**"] + } + } +} diff --git a/packages/react-native-brownfield/android/gradle.properties b/packages/react-native-brownfield/android/gradle.properties index 05b901c0..96402546 100644 --- a/packages/react-native-brownfield/android/gradle.properties +++ b/packages/react-native-brownfield/android/gradle.properties @@ -3,3 +3,6 @@ RNBrownfield_minSdkVersion=21 RNBrownfield_targetSdkVersion=31 RNBrownfield_compileSdkVersion=31 RNBrownfield_ndkversion=21.4.7075529 + +# Enable Gradle's build cache +org.gradle.caching=true diff --git a/packages/react-native-brownfield/turbo.json b/packages/react-native-brownfield/turbo.json new file mode 100644 index 00000000..2c795536 --- /dev/null +++ b/packages/react-native-brownfield/turbo.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://turbo.build/schema.json", + "extends": ["//"], + "tasks": { + "build": { + "inputs": ["src/**/*"], + "outputs": ["lib/**"] + } + } +}