Skip to content

Commit

Permalink
Merge branch 'main' into dev/atlas
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Feb 8, 2025
2 parents 07fe46a + 8c7f06a commit 1b3cefe
Show file tree
Hide file tree
Showing 12 changed files with 111 additions and 32 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build-android:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
TURBO_CACHE_DIR: .turbo/android
turbo_cache_hit: 0
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force=true
- name: Upload APK
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExample
path: |
Expand Down Expand Up @@ -156,17 +156,17 @@ jobs:
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force=true
- name: Upload IPA
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExample
name: AgoraRtcNgExample-${{ github.run_id }}
path: |
example/ios/*.ipa
if-no-files-found: error

- name: Upload dSYM
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExampleSymbol
name: AgoraRtcNgExampleSymbol-${{ github.run_id }}
path: |
example/ios/*.dSYM.zip
if-no-files-found: error
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
strategy:
matrix:
newArch: [true, false]
runs-on: macos-13
runs-on: ubuntu-22.04
env:
TURBO_CACHE_DIR: .turbo/android
ORG_GRADLE_PROJECT_newArchEnabled: ${{ matrix.newArch }}
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Update dependencies
- name: Get dependencies
id: dep
uses: AgoraIO-Extensions/actions/.github/actions/dep@main
with:
github-token: ${{ secrets.GH_TOKEN }}
dependencies-content: ${{ inputs.dependencies-content }}
target-files: |
android/build.gradle
example/ios/Podfile
react-native-agora.podspec
dependencies-content: ${{ inputs.dependencies-content }}

- name: Update dependencies
run: |
sh scripts/dep.sh ${{ steps.dep.outputs.matches }}
- name: Setup
uses: ./.github/actions/setup

- name: Update example
run: |
Expand All @@ -43,8 +42,8 @@ jobs:
pull-request-title: |
[AUTO] Update dependencies
pull-request-body: |
Dependencies content:
Dependencies content:
${{ steps.dep.outputs.matches }}
update-pod:
Expand Down Expand Up @@ -74,7 +73,7 @@ jobs:
run: |
pod update
working-directory: example/ios

- name: Commit changes
run: |
git config --global user.email "${{ secrets.GIT_EMAIL }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # run once a day at 4 AM
- cron: '0 4 * * *' # run once a day at 4 AM

jobs:
scan:
Expand All @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2.3.4
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }} # Only required for Organizations, not personal accounts.
4 changes: 2 additions & 2 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

# Allow one concurrent deployment
concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: true

jobs:
Expand All @@ -41,7 +41,7 @@ jobs:
zip -r react-native-agora-docs.zip docs
- name: Upload Artifact ⬆️
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: react-native-agora-docs.zip
path: react-native-agora-docs.zip
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@


## [4.5.1](https://github.com/AgoraIO-Extensions/react-native-agora/compare/v4.5.0...v4.5.1) (2025-01-03)


### Bug Fixes

* The issue of call API with an invalid data type may cause crash ([#847](https://github.com/AgoraIO-Extensions/react-native-agora/issues/847)) ([e94f4f2](https://github.com/AgoraIO-Extensions/react-native-agora/commit/e94f4f2e380a458de07f14f33ab14d79cf043b24))

# [4.5.0](https://github.com/AgoraIO-Extensions/react-native-agora/compare/v4.4.0...v4.5.0) (2024-12-10)


Expand Down
4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,11 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
/// dependencies start
api 'io.agora.rtc:agora-special-full:4.5.0.1'
implementation 'io.agora.rtc:full-screen-sharing:4.5.0.1'
implementation 'io.agora.rtc:iris-rtc:4.5.0-build.1'
implementation 'io.agora.rtc:iris-rtc:4.5.0-build.2'
/// dependencies end
}

if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@ target 'AgoraRtcNgExample' do
end

target 'ScreenShare' do
#dependencies start
pod 'AgoraRtcEngine_iOS', '4.5.0'
#dependencies end
end
10 changes: 5 additions & 5 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- AgoraInfra_iOS (1.2.13)
- AgoraIrisRTC_iOS (4.5.0-build.1)
- AgoraIrisRTC_iOS (4.5.0-build.2)
- AgoraRtcEngine_iOS (4.5.0):
- AgoraRtcEngine_iOS/AIAEC (= 4.5.0)
- AgoraRtcEngine_iOS/AIAECLL (= 4.5.0)
Expand Down Expand Up @@ -417,8 +417,8 @@ PODS:
- React-jsinspector (0.72.12)
- React-logger (0.72.12):
- glog
- react-native-agora (4.4.0):
- AgoraIrisRTC_iOS (= 4.5.0-build.1)
- react-native-agora (4.5.0):
- AgoraIrisRTC_iOS (= 4.5.0-build.2)
- AgoraRtcEngine_iOS (= 4.5.0)
- RCT-Folly (= 2021.07.22.00)
- React-Core
Expand Down Expand Up @@ -754,7 +754,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
AgoraInfra_iOS: 65e11a2183ab7836258768868d06058c22701b13
AgoraIrisRTC_iOS: 8207edf56ceaae6b8ee773d8e2137c6b7cb062be
AgoraIrisRTC_iOS: 67278818a420cf54184a197f7b47afb23704d7e2
AgoraRtcEngine_iOS: 38b5e0a49bbad5616f284e6a4f9e4f5bb3fb3b2e
boost: 7dcd2de282d72e344012f7d6564d024930a6a440
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
Expand Down Expand Up @@ -789,7 +789,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: 95bdf0ab46024ca9849e08739b6abd8fe489cd33
React-jsinspector: 8e291ed0ab371314de269001d6b9b25db6aabf42
React-logger: d4010de0b0564e63637ad08373bc73b5d919974b
react-native-agora: e851f18fa99b8ff8cb38bd2f2b7d17f06fd1a470
react-native-agora: 4874a8adf0ca14572feb7fafdc9f4bc69270be83
react-native-image-tools: 88218449791389bbf550a2c475a3b564c8233c8b
react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284
react-native-slider: 1cdd6ba29675df21f30544253bf7351d3c2d68c4
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-agora",
"version": "4.5.0",
"version": "4.5.1",
"description": "Agora RTC SDK For React Native",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
4 changes: 3 additions & 1 deletion react-native-agora.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ Pod::Spec.new do |s|
end
end

#dependencies start
s.dependency 'AgoraRtcEngine_iOS', '4.5.0'
s.dependency 'AgoraIrisRTC_iOS', '4.5.0-build.1'
s.dependency 'AgoraIrisRTC_iOS', '4.5.0-build.2'
#dependencies end
s.libraries = 'stdc++'
s.framework = 'ReplayKit'
end
67 changes: 67 additions & 0 deletions scripts/dep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/bin/bash
set -e
set +x
MY_PATH=$(realpath $(dirname "$0"))
PROJECT_ROOT=$(realpath ${MY_PATH}/..)
ANDROID_BUILD_GRADLE_PATH="${PROJECT_ROOT}/android/build.gradle"
iOS_PODSPEC_PATH="${PROJECT_ROOT}/react-native-agora.podspec"
EXAMPLE_IOS_PODFILE_PATH="${PROJECT_ROOT}/example/ios/Podfile"
if [ "$#" -lt 1 ]; then
exit 1
fi
INPUT=$1

MAVEN_DEPENDENCIES=$(echo "$INPUT" | jq -r '.[] | select(.platform == "Android") | .maven[]')
IRIS_MAVEN_DEPENDENCIES=$(echo "$INPUT" | jq -r '.[] | select(.platform == "Android") | .iris_maven[]')

# Function to modify dependencies
modify_dependencies() {
local dependencies="$1"
local modified_dependencies=""
while IFS= read -r line; do
if [[ "$line" == *"agora-special-full"* || "$line" == *"full-sdk"* || "$line" == *"agora-full-preview"* ]]; then
modified_dependencies+="${line/implementation/api}"$'\n'
else
modified_dependencies+="$line"$'\n'
fi
done <<< "$dependencies"
echo "$modified_dependencies"
}

if [ -z "$MAVEN_DEPENDENCIES" ] && [ -z "$IRIS_MAVEN_DEPENDENCIES" ]; then
echo "No Android maven dependencies need to change."
exit 0
else
ALL_DEPENDENCIES=$(printf "%s\n%s" "$MAVEN_DEPENDENCIES" "$IRIS_MAVEN_DEPENDENCIES" | sed 's/^/ /')
ALL_DEPENDENCIES=$(modify_dependencies "$ALL_DEPENDENCIES")
TEMP_FILE=$(mktemp)
echo "$ALL_DEPENDENCIES" > "$TEMP_FILE"
sed -i.bak -e '/\/\/\/ dependencies start/,/\/\/\/ dependencies end/{//!d;}' -e "/\/\/\/ dependencies start/r $TEMP_FILE" "$ANDROID_BUILD_GRADLE_PATH"
rm "${ANDROID_BUILD_GRADLE_PATH}.bak"
rm "$TEMP_FILE"
echo "android/build.gradle updated."
fi

COCOAPODS_DEPENDENCIES=$(echo "$INPUT" | jq -r '.[] | select(.platform == "iOS") | .cocoapods[]')
IRIS_COCOAPODS_DEPENDENCIES=$(echo "$INPUT" | jq -r '.[] | select(.platform == "iOS") | .iris_cocoapods[]')

if [ -z "$COCOAPODS_DEPENDENCIES" ] && [ -z "$IRIS_COCOAPODS_DEPENDENCIES" ]; then
echo "No iOS cocoapods dependencies need to change."
exit 0
else
ALL_DEPENDENCIES=$(printf "%s\n%s" "$COCOAPODS_DEPENDENCIES" "$IRIS_COCOAPODS_DEPENDENCIES" | sed 's/^pod /s.dependency /' | sed 's/^/ /')
TEMP_FILE=$(mktemp)
echo "$ALL_DEPENDENCIES" > "$TEMP_FILE"
sed -i.bak -e '/#dependencies start/,/#dependencies end/{//!d;}' -e "/#dependencies start/r $TEMP_FILE" "$iOS_PODSPEC_PATH"
rm "${iOS_PODSPEC_PATH}.bak"
rm "$TEMP_FILE"
echo "react-native-agora.podspec updated."

EXAMPLE_DEPENDENCIES=$(printf "%s\n%s" "$COCOAPODS_DEPENDENCIES" | sed 's/^/ /')
TEMP_FILE=$(mktemp)
echo "$EXAMPLE_DEPENDENCIES" > "$TEMP_FILE"
sed -i.bak -e '/#dependencies start/,/#dependencies end/{//!d;}' -e "/#dependencies start/r $TEMP_FILE" "$EXAMPLE_IOS_PODFILE_PATH"
rm "${EXAMPLE_IOS_PODFILE_PATH}.bak"
rm "$TEMP_FILE"
echo "example/ios/Podfile updated."
fi

0 comments on commit 1b3cefe

Please sign in to comment.