diff --git a/.circleci/config.yml b/.circleci/config.yml index 36ffd0eed..8d228f68b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,6 +31,10 @@ jobs: environment: NODE_OPTIONS: "--max-old-space-size=4096" + - run: + name: Build the Project + command: yarn run build + - run: name: Install AEPSampleApp Dependencies command: cd apps/AEPSampleApp && yarn install --immutable --network-timeout 300000 @@ -38,10 +42,6 @@ jobs: environment: NODE_OPTIONS: "--max-old-space-size=4096" - - run: - name: Build the Project - command: yarn run build - - run: name: Expo Prebuild command: cd apps/AEPSampleAppNewArchEnabled && npx expo prebuild @@ -172,7 +172,7 @@ jobs: command: sudo xcode-select -s /Applications/Xcode.app - node/install: - node-version: '20.19.4' + node-version: '22.12.0' - run: name: Enable Corepack diff --git a/apps/AEPSampleApp/.gitignore b/apps/AEPSampleApp/.gitignore index 0cab2ac6f..7cc8b51e6 100644 --- a/apps/AEPSampleApp/.gitignore +++ b/apps/AEPSampleApp/.gitignore @@ -61,6 +61,8 @@ yarn-error.log # Temporary files created by Metro to check the health of the file watcher .metro-health-check* +.metro-build-matrix.log +.metro-build-matrix.pid # testing /coverage diff --git a/apps/AEPSampleApp/App.tsx b/apps/AEPSampleApp/App.tsx index 1fd42327d..c5e072eee 100644 --- a/apps/AEPSampleApp/App.tsx +++ b/apps/AEPSampleApp/App.tsx @@ -35,7 +35,7 @@ import { useState, useEffect, createContext, useContext } from 'react'; const STORAGE_KEY = 'aep_app_id'; -const DEFAULT_APP_ID = ''; +const DEFAULT_APP_ID = '3149c49c3910/0f12baf27522/launch-0d096c129660-development'; export const AppContext = createContext({ appId: DEFAULT_APP_ID, diff --git a/apps/AEPSampleApp/android/build.gradle b/apps/AEPSampleApp/android/build.gradle index 3ed3f9bdf..69f69b2a0 100644 --- a/apps/AEPSampleApp/android/build.gradle +++ b/apps/AEPSampleApp/android/build.gradle @@ -15,3 +15,19 @@ plugins { id("org.jetbrains.kotlin.android") version "2.1.20" apply false id("com.facebook.react.rootproject") } + +// USE_INTEROP_ROOT for @adobe/react-native-aepoptimize (RN 0.85 / Gradle 9). +// gradle.properties USE_INTEROP_ROOT is toggled by scripts/build-matrix.sh. +def optimizeUseInteropRoot = findProperty("USE_INTEROP_ROOT") ?: "false" + +gradle.beforeProject { project -> + if (project.name == "adobe_react-native-aepoptimize") { + project.afterEvaluate { + project.android { + defaultConfig { + buildConfigField "boolean", "USE_INTEROP_ROOT", optimizeUseInteropRoot + } + } + } + } +} diff --git a/apps/AEPSampleApp/android/gradle.properties b/apps/AEPSampleApp/android/gradle.properties index b866a0ae2..f0382d997 100644 --- a/apps/AEPSampleApp/android/gradle.properties +++ b/apps/AEPSampleApp/android/gradle.properties @@ -36,6 +36,9 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # are providing them. newArchEnabled=true +# USE_INTEROP_ROOT for @adobe/react-native-aepoptimize (build-matrix.sh toggles this). +USE_INTEROP_ROOT=false + # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. hermesEnabled=true diff --git a/apps/AEPSampleApp/extensions/OptimizeView.tsx b/apps/AEPSampleApp/extensions/OptimizeView.tsx index a37813fd9..e18f83a75 100644 --- a/apps/AEPSampleApp/extensions/OptimizeView.tsx +++ b/apps/AEPSampleApp/extensions/OptimizeView.tsx @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag governing permissions and limitations under the License. */ -import React, {useState} from 'react'; +import React, {useMemo, useState} from 'react'; import { Optimize, DecisionScope, @@ -27,6 +27,7 @@ import { useWindowDimensions, TextInput, StyleSheet, + ScrollView, } from 'react-native'; import {RecyclerListView, DataProvider, LayoutProvider} from 'recyclerlistview'; @@ -47,6 +48,22 @@ const defaultPropositions = { jsonProposition: '{"Type": "JSON place holder"}', }; +function SmokeButton({ + id, + title, + onPress, +}: { + id: string; + title: string; + onPress: () => void; +}) { + return ( + +