Skip to content

Commit

Permalink
Merge pull request #351 from adobe/staging
Browse files Browse the repository at this point in the history
Staging -> main for v6.0.1 release
  • Loading branch information
yangyansong-adbe authored Apr 23, 2024
2 parents 7df5d25 + 9862ade commit 3cd87ac
Show file tree
Hide file tree
Showing 90 changed files with 17,134 additions and 13,691 deletions.
61 changes: 22 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

orbs:
macos: circleci/macos@2.4.1
rn: react-native-community/react-native@7.4.0

jobs:
unit-test:
docker:
- image: cimg/node:19.7.0
# switch to use node v18.x becaseu of the error: the engine "node" is incompatible with this module. Expected version "^16.10.0 || ^18.0.0 || >=20.0.0". Got "19.7.0"
- image: cimg/node:18.20

steps:
- checkout
Expand All @@ -26,50 +31,33 @@ jobs:
command: yarn test --watchAll=false --runInBand

build-sample-app-android:
docker:
- image: circleci/android:api-30-node

resource_class: large
executor:
name: rn/linux_android
# the installed tools within the image: https://hub.docker.com/r/reactnativecommunity/react-native-android/tags
build_image_version: v13.0
resource_class: large

steps:
- checkout

- run:
name: Swap node versions
command: |
set +e
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v18
nvm alias default 18
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
- run:
name: yarn install
command: yarn install

- run:
name: Building Android Sample App
command: |
export NODE_OPTIONS=--max-old-space-size=8192
yarn sampleapp:android:build
command: yarn sampleapp:android:build

environment:
_JAVA_OPTIONS: "-Xmx4096M -XX:MaxMetaspaceSize=512m"

build-sample-app-ios:
macos:
xcode: 15.0.1

resource_class: macos.m1.large.gen1
xcode: 15.2 # Specify the Xcode version to use

steps:
- checkout

- run:
name: Install latest NodeJS
command: brew install node

- restore_cache:
keys:
- ios-yarn-cache-{{ checksum "yarn.lock" }}
Expand All @@ -90,23 +78,18 @@ jobs:
name: Install pods
command: yarn sampleapp:ios:pod:install

- run:
name: Yoga fix
command: |
cd apps/AEPSampleApp
sed -i.bo 's/ node->getLayout()\.hadOverflow() |$/\0|/' ./node_modules/react-native/ReactCommon/yoga/yoga/Yoga.cpp
cd ../../
rm -rf ~/Library/Developer/Xcode/DerivedData
- run:
name: Building iOS Sample App
command: cd apps/AEPSampleApp && npx react-native run-ios --verbose
command: cd apps/AEPSampleApp && npx react-native run-ios --verbose --terminal terminal

workflows:
version: 2.1
ci-workflow:
jobs:
- unit-test
# Uncomment the following lines to build the ios code after this issue is fixed: https://github.com/adobe/aepsdk-react-native/issues/272
- build-sample-app-ios
- build-sample-app-android
# - 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.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This repository is a monorepo and contains a collection of React Native modules

- React Native

Requires React Native (0.60.0 - 0.72.x)
Requires React Native (0.60.0 and above)

- Xcode

Expand Down
3 changes: 0 additions & 3 deletions apps/AEPSampleApp/.gitattributes

This file was deleted.

2 changes: 1 addition & 1 deletion apps/AEPSampleApp/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
12 changes: 12 additions & 0 deletions apps/AEPSampleApp/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
Copyright 2024 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import * as React from 'react';
import {Button, View} from 'react-native';
import {createDrawerNavigator} from '@react-navigation/drawer';
Expand Down
5 changes: 4 additions & 1 deletion apps/AEPSampleApp/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

gem 'cocoapods', '~> 1.12'
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
100 changes: 0 additions & 100 deletions apps/AEPSampleApp/Gemfile.lock

This file was deleted.

1 change: 0 additions & 1 deletion apps/AEPSampleApp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,3 @@ Assurance is integrated in the sample app for validating the events and flows.
* Getting error when building app in Xcode 15 RCT-Folly hash - No template named 'unary_function' in namespace std <br>
This error may be thrown due to an incompatiblity between React Native version 0.68.x and Xcode 15. Make sure you are running with React Native 0.70 or above, if needed pull the latest updates from main branch of this repo, and run [Install dependencies](#install-dependencies) again.


55 changes: 0 additions & 55 deletions apps/AEPSampleApp/android/app/_BUCK

This file was deleted.

14 changes: 5 additions & 9 deletions apps/AEPSampleApp/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

/**
Expand Down Expand Up @@ -70,12 +71,12 @@ def jscFlavor = 'org.webkit:android-jsc:+'

android {
ndkVersion rootProject.ext.ndkVersion

buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace "com.reactnative.aepsampleapp"
namespace "com.aepsampleapp"
defaultConfig {
applicationId "com.reactnative.aepsampleapp"
applicationId "com.aepsampleapp"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
Expand Down Expand Up @@ -106,13 +107,8 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration")

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
Expand Down
19 changes: 0 additions & 19 deletions apps/AEPSampleApp/android/app/build_defs.bzl

This file was deleted.

5 changes: 1 addition & 4 deletions apps/AEPSampleApp/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>
Loading

0 comments on commit 3cd87ac

Please sign in to comment.