diff --git a/.circleci/config.yml b/.circleci/config.yml index dd5facd39..953c5d786 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,36 +8,45 @@ orbs: jobs: unit-test: docker: - - image: cimg/node:18.20 + - image: cimg/node:18.20 + resource_class: large steps: - - checkout + - checkout - - restore_cache: - keys: + - restore_cache: + keys: - yarn-cache-{{ checksum "yarn.lock" }} + - yarn-cache- - - run: - name: Install Node.js and Yarn Dependencies - command: yarn install + - run: + name: Enable Corepack + command: corepack enable - - run: - name: Build the Project - command: yarn run build + - run: + name: Install Node.js and Yarn Dependencies + command: yarn install --immutable --network-timeout 300000 + no_output_timeout: 20m + environment: + NODE_OPTIONS: "--max-old-space-size=4096" - - run: - name: Expo Prebuild - command: cd apps/AEPSampleAppNewArchEnabled && npx expo prebuild + - run: + name: Build the Project + command: yarn run build - - save_cache: - key: yarn-cache-{{ checksum "yarn.lock" }} - paths: - - ./node_modules - - ./apps/AEPSampleAppNewArchEnabled/node_modules + - run: + name: Expo Prebuild + command: cd apps/AEPSampleAppNewArchEnabled && npx expo prebuild - - run: - name: Unit Tests - command: yarn test --watchAll=false --runInBand + - save_cache: + paths: + - .yarn/cache + - .yarn/unplugged + key: yarn-cache-{{ checksum "yarn.lock" }} + + - run: + name: Unit Tests + command: yarn test --watchAll=false --runInBand build-sample-app-android: executor: @@ -46,86 +55,101 @@ jobs: resource_class: large steps: - - checkout + - checkout + + - run: + name: Enable Corepack + command: corepack enable - - run: - name: Install Node.js and Yarn Dependencies - command: yarn install + - run: + name: Install Node.js and Yarn Dependencies + command: yarn install --network-timeout 300000 + no_output_timeout: 20m + environment: + NODE_OPTIONS: "--max-old-space-size=4096" - - run: - name: Build the Project - command: yarn run build + - run: + name: Build the Project + command: yarn run build - - run: - name: Expo Prebuild - command: cd apps/AEPSampleAppNewArchEnabled && npx expo prebuild + - run: + name: Expo Prebuild + command: cd apps/AEPSampleAppNewArchEnabled && npx expo prebuild - - run: - name: Building Android Sample App - command: yarn sampleappnewarchenabled:android:build - environment: - _JAVA_OPTIONS: "-Xmx4096M -XX:MaxMetaspaceSize=512m" + - run: + name: Building Android Sample App + command: yarn sampleappnewarchenabled:android:build + environment: + _JAVA_OPTIONS: "-Xmx4096M -XX:MaxMetaspaceSize=512m" build-sample-app-ios: macos: xcode: 15.2 steps: - - checkout - - - restore_cache: - keys: - - ios-yarn-cache-{{ checksum "yarn.lock" }} - - - run: - name: Set Xcode Path - command: sudo xcode-select -s /Applications/Xcode.app - - - run: - name: Install Node.js and Yarn Dependencies - command: yarn install - - - run: - name: Build the Project - command: yarn run build - - - run: - name: Expo Prebuild - command: cd apps/AEPSampleAppNewArchEnabled && npx expo prebuild - - - save_cache: - key: ios-yarn-cache-{{ checksum "yarn.lock" }} - paths: - - ./node_modules - - ./apps/AEPSampleAppNewArchEnabled/node_modules - - - run: - name: Install Cocoapods - command: sudo gem install cocoapods - - - run: - name: Install Pods - command: yarn sampleappnewarchenabled:ios:pod:install - - - run: - name: Building iOS Sample App - command: | - cd apps/AEPSampleAppNewArchEnabled/ios - xcodebuild \ - -workspace AEPSampleAppNewArchEnabled.xcworkspace \ - -scheme AEPSampleAppNewArchEnabled \ - -sdk iphonesimulator \ - -destination "generic/platform=iOS Simulator" \ - clean build + - checkout + + - restore_cache: + keys: + - yarn-cache-{{ checksum "yarn.lock" }} + - yarn-cache- + + - run: + name: Set Xcode Path + command: sudo xcode-select -s /Applications/Xcode.app + + - run: + name: Enable Corepack + command: corepack enable + + - run: + name: Install Node.js and Yarn Dependencies + command: yarn install --immutable --network-timeout 300000 + no_output_timeout: 20m + 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 + + - save_cache: + paths: + - .yarn/cache + - .yarn/unplugged + key: yarn-cache-{{ checksum "yarn.lock" }} + + - run: + name: Install Cocoapods + command: sudo gem install cocoapods + + - run: + name: Install Pods + command: yarn sampleappnewarchenabled:ios:pod:install + + - run: + name: Building iOS Sample App + command: | + cd apps/AEPSampleAppNewArchEnabled/ios + xcodebuild \ + -workspace AEPSampleAppNewArchEnabled.xcworkspace \ + -scheme AEPSampleAppNewArchEnabled \ + -sdk iphonesimulator \ + -destination "generic/platform=iOS Simulator" \ + clean build workflows: version: 2.1 ci-workflow: jobs: - - unit-test - - build-sample-app-ios - # - build-sample-app-android - # Disable the Android build job because of the error below: - # Execution failed for task ':react-native-reanimated:configureCMakeDebug[arm64-v8a]'. - # > [CXX1210] /root/project/apps/AEPSampleApp/node_modules/react-native-reanimated/android/CMakeLists.txt debug|arm64-v8a : No compatible library found - # The Android build job will be enabled once the issue is resolved. + - unit-test + - build-sample-app-ios + # - build-sample-app-android + # Disable the Android build job because of the error below: + # Execution failed for task ':react-native-reanimated:configureCMakeDebug[arm64-v8a]'. + # > [CXX1210] /root/project/apps/AEPSampleApp/node_modules/react-native-reanimated/android/CMakeLists.txt debug|arm64-v8a : No compatible library found + # The Android build job will be enabled once the issue is resolved. diff --git a/.cursorignore b/.cursorignore new file mode 100644 index 000000000..0dda499a5 --- /dev/null +++ b/.cursorignore @@ -0,0 +1 @@ +apps/AEPSampleApp \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..025dd8c8b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..af3ad1281 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +/.yarn/** linguist-vendored +/.yarn/releases/* binary +/.yarn/plugins/**/* binary +/.pnp.* binary linguist-generated diff --git a/.gitignore b/.gitignore index 48e6d3b41..77fb31a48 100644 --- a/.gitignore +++ b/.gitignore @@ -152,3 +152,6 @@ out/ # ignore ds store .DS_Store + +# temporary allow messaging compiled code +!packages/messaging/dist/ \ No newline at end of file diff --git a/.yarnrc.yml b/.yarnrc.yml index 3186f3f07..de80f2bac 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1 +1,2 @@ nodeLinker: node-modules +nmHoistingLimits: workspaces diff --git a/apps/AEPSampleApp/package.json b/apps/AEPSampleApp/package.json index ed441a15f..f6bb17703 100644 --- a/apps/AEPSampleApp/package.json +++ b/apps/AEPSampleApp/package.json @@ -2,11 +2,6 @@ "name": "aepsampleapp", "version": "2.0.0", "private": true, - "workspaces": { - "nohoist": [ - "**/*" - ] - }, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", @@ -66,6 +61,7 @@ "node": ">=16" }, "installConfig": { - "hoistingLimits": "dependencies" + "hoistingLimits": "workspaces", + "selfReferences": false } } diff --git a/apps/AEPSampleAppNewArchEnabled/app.json b/apps/AEPSampleAppNewArchEnabled/app.json index 94ea742e7..fc17cfaee 100644 --- a/apps/AEPSampleAppNewArchEnabled/app.json +++ b/apps/AEPSampleAppNewArchEnabled/app.json @@ -14,14 +14,14 @@ }, "ios": { "supportsTablet": true, - "bundleIdentifier": "com.AEPSampleAppNewArchEnabled" + "bundleIdentifier": "com.adobe.MessagingDemoAppSwiftUI" }, "android": { "adaptiveIcon": { "foregroundImage": "./assets/images/adaptive-icon.png", "backgroundColor": "#ffffff" }, - "package": "com.AEPSampleAppNewArchEnabled" + "package": "com.adobe.marketing.mobile.messagingsample" }, "web": { "bundler": "metro", @@ -34,11 +34,12 @@ "expo-build-properties", { "ios": { - "newArchEnabled": true, + "newArchEnabled": true, "useFrameworks": "static" }, "android": { - "newArchEnabled": true + "newArchEnabled": true, + "kotlinVersion": "1.9.25" } } ], diff --git a/apps/AEPSampleAppNewArchEnabled/app/AssuranceView.tsx b/apps/AEPSampleAppNewArchEnabled/app/AssuranceView.tsx index 7015ec8f8..5a72d3795 100644 --- a/apps/AEPSampleAppNewArchEnabled/app/AssuranceView.tsx +++ b/apps/AEPSampleAppNewArchEnabled/app/AssuranceView.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, { useState } from "react"; import { Button, StyleSheet, @@ -18,30 +18,30 @@ import { View, TextInput, ScrollView, -} from 'react-native'; -import {Assurance} from '@adobe/react-native-aepassurance'; -import { useRouter } from 'expo-router'; +} from "react-native"; +import { Assurance } from "@adobe/react-native-aepassurance"; +import { useRouter } from "expo-router"; const AssuranceView = () => { - const [version, setVersion] = useState(''); - const [sessionURL, setsessionURL] = useState('your-assurance-url'); + const [version, setVersion] = useState(""); + const [sessionURL, setsessionURL] = useState("your-assurance-url"); const router = useRouter(); - Assurance.extensionVersion().then(version => { + Assurance.extensionVersion().then((version) => { setVersion(version); }); return ( - -