@volcengine/react-native-live-pull 1.3.0-rc.4 → 1.3.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,41 @@ def isNewArchitectureEnabled() {
13
13
  return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
14
14
  }
15
15
 
16
+ // Version configuration through environment variables or gradle properties
17
+ def ttsdk_ttlivepull_rtc_version
18
+ def envVersion = System.getenv('TTSDK_TTLIVEPULL_RTC_VERSION_FOR_LIVE_PULL')
19
+ if (envVersion) {
20
+ ttsdk_ttlivepull_rtc_version = envVersion
21
+ } else if (rootProject.hasProperty('TTSDK_TTLIVEPULL_RTC_VERSION_FOR_LIVE_PULL')) {
22
+ ttsdk_ttlivepull_rtc_version = rootProject.property('TTSDK_TTLIVEPULL_RTC_VERSION_FOR_LIVE_PULL')
23
+ } else {
24
+ // Fallback to versions from package.json
25
+ def packageJson = file("../package.json")
26
+ def slurper = new groovy.json.JsonSlurper()
27
+ def parsedJson = slurper.parseText(packageJson.text)
28
+ def isBp = parsedJson.name.startsWith("@byteplus")
29
+
30
+ if (isBp) {
31
+ ttsdk_ttlivepull_rtc_version = parsedJson.nativeVersion.byteplus.android
32
+ } else {
33
+ ttsdk_ttlivepull_rtc_version = parsedJson.nativeVersion.volc.android
34
+ }
35
+ }
36
+
37
+ // VolcApiEngine version configuration
38
+ def volc_api_engine_version
39
+ def volcApiEnvVersion = System.getenv('VOLC_API_ENGINE_VERSION_FOR_LIVE_PULL')
40
+ if (volcApiEnvVersion) {
41
+ volc_api_engine_version = volcApiEnvVersion
42
+ } else if (rootProject.hasProperty('VOLC_API_ENGINE_VERSION_FOR_LIVE_PULL')) {
43
+ volc_api_engine_version = rootProject.property('VOLC_API_ENGINE_VERSION_FOR_LIVE_PULL')
44
+ } else {
45
+ volc_api_engine_version = "1.6.4" // Default version
46
+ }
47
+
48
+ println "[LIVE PULL GRADLE INFO]: Using ttsdk_ttlivepull_rtc version: $ttsdk_ttlivepull_rtc_version"
49
+ println "[LIVE PULL GRADLE INFO]: Using volc_api_engine version: $volc_api_engine_version"
50
+
16
51
  apply plugin: "com.android.library"
17
52
  apply from: "https://ve-vos.volccdn.com/script/vevos-repo-base.gradle"
18
53
 
@@ -88,6 +123,6 @@ dependencies {
88
123
  // noinspection GradleDynamicVersion
89
124
  implementation "com.facebook.react:react-native:+"
90
125
 
91
- implementation "com.volcengine:VolcApiEngine:1.6.2"
92
- implementation 'com.bytedanceapi:ttsdk-ttlivepull_rtc:1.46.3.6'
126
+ implementation "com.volcengine:VolcApiEngine:$volc_api_engine_version"
127
+ implementation "com.bytedanceapi:ttsdk-ttlivepull_rtc:$ttsdk_ttlivepull_rtc_version"
93
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volcengine/react-native-live-pull",
3
- "version": "1.3.0-rc.4",
3
+ "version": "1.3.0-rc.5",
4
4
  "peerDependencies": {
5
5
  "react": "*",
6
6
  "react-native": "*"
@@ -2,6 +2,7 @@ require "json"
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
4
  folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5
+ is_bp = package['name'].start_with?('@byteplus')
5
6
 
6
7
  Pod::Spec.new do |s|
7
8
  s.name = "react-native-velive-pull"
@@ -49,8 +50,8 @@ Pod::Spec.new do |s|
49
50
  end
50
51
 
51
52
  # Version configuration through environment variables
52
- volc_api_engine_version = ENV['VOLC_API_ENGINE_VERSION'] || '1.6.4'
53
- ttsdk_framework_version = ENV['TTSDK_FRAMEWORK_VERSION'] || '1.46.300.5-premium'
53
+ volc_api_engine_version = ENV['VOLC_API_ENGINE_VERSION_FOR_LIVE_PULL'] || '1.6.4'
54
+ ttsdk_framework_version = ENV['TTSDK_FRAMEWORK_VERSION_FOR_LIVE_PULL'] || (is_bp ? package['nativeVersion']['byteplus']['ios'] : package['nativeVersion']['volc']['ios'])
54
55
 
55
56
  s.dependency 'VolcApiEngine', volc_api_engine_version
56
57
  s.dependency 'TTSDKFramework/Core', ttsdk_framework_version