Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
00ea7d2
chore: change terra config to 4.5.1
guoxianzhe Feb 11, 2025
b2511c9
chore: optimize
guoxianzhe Feb 11, 2025
1fed3b5
[AUTO] Generate codes by terra (#854)
sda-rob Feb 11, 2025
ab0d4e0
chore: optimize
guoxianzhe Feb 11, 2025
608fa42
Merge branch 'dev/4.5.2' of ssh://github.com/AgoraIO-Extensions/react…
guoxianzhe Feb 11, 2025
07bfc18
chore: optimize
guoxianzhe Feb 11, 2025
9009eba
[AUTO] Update dependencies (#855)
sda-rob Feb 11, 2025
e5abd0e
chore: optimize
guoxianzhe Feb 14, 2025
f41b40f
[AUTO] Update dependencies (#856)
sda-rob Feb 25, 2025
2a71ae4
[AUTO] Update dependencies (#858)
sda-rob Feb 28, 2025
d8ef1e7
chore: optimize
guoxianzhe Feb 28, 2025
a0b3266
chore: optimize
guoxianzhe Mar 4, 2025
cecd1f1
chore: optimize
guoxianzhe Mar 4, 2025
0475602
feat(demo): upgrade react-native demo to 0.77.1 (#857)
guoxianzhe Mar 5, 2025
448cf99
chore: optimize
guoxianzhe Mar 5, 2025
670c276
chore: optimize
guoxianzhe Mar 5, 2025
4db2352
[AUTO] Update dependencies (#860)
sda-rob Mar 5, 2025
76a292a
chore: optimize
guoxianzhe Mar 5, 2025
e4ccc4a
Merge branch 'dev/4.5.2' of ssh://github.com/AgoraIO-Extensions/react…
guoxianzhe Mar 5, 2025
72766ca
chore: optimize
guoxianzhe Mar 5, 2025
a088862
[AUTO] Generate codes by terra
guoxianzhe Mar 11, 2025
724e441
Merge pull request #862 from AgoraIO-Extensions/dev/4.5.2-terra-update
guoxianzhe Mar 11, 2025
a0e1e4b
chore: optimize
guoxianzhe Mar 11, 2025
66cdd5b
Merge branch 'dev/4.5.2' of ssh://github.com/AgoraIO-Extensions/react…
guoxianzhe Mar 11, 2025
e37a96d
chore: optimize
guoxianzhe Mar 11, 2025
6ebf32e
chore: optimize
guoxianzhe Mar 11, 2025
b5c07a9
Revert "chore: optimize"
guoxianzhe Mar 11, 2025
9baa9e0
chore: optimize
guoxianzhe Mar 11, 2025
807e34b
Revert "chore: optimize"
guoxianzhe Mar 11, 2025
c107a68
Revert "chore: optimize"
guoxianzhe Mar 11, 2025
19c722e
chore: optimize
guoxianzhe Mar 11, 2025
72c9545
chore: optimize
guoxianzhe Mar 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"env": {
"es2020": true
},
"plugins": ["import", "auto-import"],
"plugins": ["import", "auto-import", "eslint-plugin-prettier"],
"rules": {
"prettier/prettier": [
"error",
Expand Down
34 changes: 21 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ on:

jobs:
build-android:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
newArch: [false, true]
env:
TURBO_CACHE_DIR: .turbo/android
turbo_cache_hit: 0
ORG_GRADLE_PROJECT_newArchEnabled: ${{ matrix.newArch }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -24,9 +28,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-turborepo-android-${{ matrix.newArch }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-
${{ runner.os }}-turborepo-android-${{ matrix.newArch }}-

- name: Check turborepo cache for Android
run: |
Expand All @@ -41,7 +45,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Finalize Android SDK
if: env.turbo_cache_hit != 1
Expand All @@ -55,9 +59,9 @@ jobs:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-false-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
key: ${{ runner.os }}-gradle-${{ matrix.newArch }}-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-false-
${{ runner.os }}-gradle-${{ matrix.newArch }}-

- name: Modify APP ID
run: |
Expand All @@ -72,16 +76,20 @@ jobs:
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExample
name: AgoraRtcNgExample-Android-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
path: |
example/android/app/build/outputs/apk/release/*.apk
if-no-files-found: error

build-ios:
runs-on: macos-latest
strategy:
matrix:
newArch: [false, true]
env:
TURBO_CACHE_DIR: .turbo/ios
turbo_cache_hit: 0
RCT_NEW_ARCH_ENABLED: ${{ matrix.newArch }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -97,9 +105,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-turborepo-ios-${{ matrix.newArch }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-ios-
${{ runner.os }}-turborepo-ios-${{ matrix.newArch }}-

- name: Cache cocoapods
if: env.turbo_cache_hit != 1
Expand All @@ -108,9 +116,9 @@ jobs:
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-0-${{ hashFiles('example/ios/Podfile.lock') }}
key: ${{ runner.os }}-cocoapods-${{ matrix.newArch }}-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-0-
${{ runner.os }}-cocoapods-${{ matrix.newArch }}-

- name: Install cocoapods
run: |
Expand Down Expand Up @@ -158,15 +166,15 @@ jobs:
- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExample-${{ github.run_id }}
name: AgoraRtcNgExample-iOS-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
path: |
example/ios/*.ipa
if-no-files-found: error

- name: Upload dSYM
uses: actions/upload-artifact@v4
with:
name: AgoraRtcNgExampleSymbol-${{ github.run_id }}
name: AgoraRtcNgExampleSymbol-${{ matrix.newArch && 'NewArch' || 'OldArch' }}-${{ github.run_id }}
path: |
example/ios/*.dSYM.zip
if-no-files-found: error
Expand Down
50 changes: 19 additions & 31 deletions .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: ubuntu-22.04
runs-on: ubuntu-latest
env:
TURBO_CACHE_DIR: .turbo/android
ORG_GRADLE_PROJECT_newArchEnabled: ${{ matrix.newArch }}
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- name: Finalize Android SDK
if: env.turbo_cache_hit != 1
Expand Down Expand Up @@ -132,6 +132,23 @@ jobs:
run: |
yarn turbo run detox:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"

- name: Clean Useless cache
run: |
rm -rf "${{ env.TURBO_CACHE_DIR }}" || true
rm -rf ~/.gradle/caches || true
rm -rf ~/.gradle/wrapper || true
sudo apt-get clean
npm cache clean --force
rm -rf example/ios
yarn cache clean
df -h

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Run e2e tests
# https://github.com/wix/Detox/issues/3720#issuecomment-1347855162
if: ${{ matrix.newArch == false }}
Expand All @@ -151,43 +168,14 @@ jobs:
env:
TURBO_CACHE_DIR: .turbo/ios
RCT_NEW_ARCH_ENABLED: ${{ matrix.newArch }}
turbo_cache_hit: 0
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Cache turborepo for iOS
uses: actions/cache@v3
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-detox-${{ matrix.newArch }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-ios-detox-${{ matrix.newArch }}-

- name: Check turborepo cache for iOS
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run detox:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'detox:ios').cache.status")

if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi

- name: Cache cocoapods
if: env.turbo_cache_hit != 1
id: cocoapods-cache
uses: actions/cache@v3
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapod-${{ matrix.newArch }}-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-${{ matrix.newArch }}-

- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
yarn pod-install example/ios

Expand Down
38 changes: 1 addition & 37 deletions .github/workflows/dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
update-dependencies:
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -45,39 +45,3 @@ jobs:
Dependencies content:

${{ steps.dep.outputs.matches }}

update-pod:
runs-on: macos-latest
needs: update-dependencies
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}-dep-update
token: ${{ secrets.GH_TOKEN }}

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

- name: Cache cocoapods
id: cocoapods-cache
uses: actions/cache@v3
with:
path: |
**/ios/Pods
key: ${{ runner.os }}-cocoapods-0-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-0-

- name: Update Podfile.lock
run: |
pod update
working-directory: example/ios

- name: Commit changes
run: |
git config --global user.email "${{ secrets.GIT_EMAIL }}"
git config --global user.name "${{ secrets.GIT_USERNAME }}"
git add example
git commit -m "chore(example): update Podfile.lock by new dependencies"
git push
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Sync to shengwang
uses: AgoraIO-Extensions/actions/.github/actions/shengwang-sync@sync
uses: AgoraIO-Extensions/actions/.github/actions/shengwang-sync@main
with:
target-repo: 'react-native-shengwang'
source-repo: 'react-native-agora'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ build/
xcuserdata
*.xccheckout
*.xcode.env.local
**/.xcode.env.local
*.moved-aside
DerivedData
*.hmap
Expand All @@ -44,6 +45,7 @@ android.iml
# Cocoapods
#
example/ios/Pods
**/Pods/

# Ruby
example/vendor/
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ yarn clean
To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:

```sh
Running "AgoraRtcNgExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
Running "AgoraRtcNgExample" with {"fabric":true,"initialProps":{},"rootTag":1}
```

Note the `"fabric":true` and `"concurrentRoot":true` properties.
Note the `"fabric":true` properties.

Make sure your code passes TypeScript and ESLint. Run the following to verify:

Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ dependencies {
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.2'
api 'io.agora.rtc:full-sdk:4.5.1'
implementation 'io.agora.rtc:full-screen-sharing:4.5.1'
implementation 'io.agora.rtc:iris-rtc:4.5.1-build.1'
/// dependencies end
}

Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
7 changes: 5 additions & 2 deletions example/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ 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'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
31 changes: 14 additions & 17 deletions example/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 All @@ -7,14 +8,14 @@ apply plugin: "com.facebook.react"
*/
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
// The root of your project, i.e. where "package.json" lives. Default is '../..'
// root = file("../../")
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
// reactNativeDir = file("../../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
// codegenDir = file("../../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
// cliFile = file("../../node_modules/react-native/cli.js")

/* Variants */
// The list of variants to that are debuggable. For those we're going to
Expand Down Expand Up @@ -48,6 +49,9 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]

/* Autolinking */
autolinkLibrariesWithApp()
}

/**
Expand All @@ -71,7 +75,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
android {
ndkVersion rootProject.ext.ndkVersion

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

namespace "com.agorartcngexample"
defaultConfig {
Expand Down Expand Up @@ -117,17 +122,9 @@ dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

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 {
implementation jscFlavor
}
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
1 change: 0 additions & 1 deletion example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
</manifest>
Loading
Loading