react-native-acoustic-connect-beta 16.0.27 → 16.0.29
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.
- package/Example/nativebase-v3-kitchensink/package.json +1 -1
- package/Jenkinsfile +61 -1
- package/android/config.gradle +187 -1
- package/android/src/main/assets/ConnectAdvancedConfig.json +3 -0
- package/android/src/main/assets/EOCoreAdvancedConfig.json +1509 -0
- package/android/src/main/assets/EOCoreBasicConfig.properties +29 -0
- package/android/src/main/assets/TealeafAdvancedConfig.json +42 -0
- package/android/src/main/assets/TealeafBasicConfig.properties +76 -0
- package/android/src/main/assets/TealeafLayoutConfig.json +74 -0
- package/package.json +1 -1
- package/scripts/ConnectConfig.json +98 -90
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"react": "18.2.0",
|
|
16
16
|
"react-dom": "18.2.0",
|
|
17
17
|
"react-native": "0.72.10",
|
|
18
|
-
"react-native-acoustic-connect-beta": "16.0.
|
|
18
|
+
"react-native-acoustic-connect-beta": "16.0.29",
|
|
19
19
|
"react-native-gesture-handler": "~2.12.0",
|
|
20
20
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
21
21
|
"react-native-reanimated": "~3.3.0",
|
package/Jenkinsfile
CHANGED
|
@@ -101,6 +101,7 @@ pipeline {
|
|
|
101
101
|
script{
|
|
102
102
|
echo "genBuild:${genBuild}"
|
|
103
103
|
if (genBuild) {
|
|
104
|
+
updateLibraryDependencies(true)
|
|
104
105
|
publishBeta()
|
|
105
106
|
}
|
|
106
107
|
}
|
|
@@ -443,6 +444,66 @@ def updateLibVersion() {
|
|
|
443
444
|
echo "${updatedExamplePackageFile}"
|
|
444
445
|
}
|
|
445
446
|
|
|
447
|
+
def updateLibraryDependencies(isBeta) {
|
|
448
|
+
def androidConnectLatest = getAndroidLatestVersion(isBeta, "connect")
|
|
449
|
+
def androidTealeafLatest = getAndroidLatestVersion(isBeta, "tealeaf")
|
|
450
|
+
def androidEOCoreLatest = getAndroidLatestVersion(isBeta, "eocore")
|
|
451
|
+
|
|
452
|
+
downloadAndroidLatestVersion(isBeta, "connect", androidConnectLatest)
|
|
453
|
+
downloadAndroidLatestVersion(isBeta, "tealeaf", androidTealeafLatest)
|
|
454
|
+
downloadAndroidLatestVersion(isBeta, "eocore", androidEOCoreLatest)
|
|
455
|
+
|
|
456
|
+
runCMD("cd ${buildDir} && unzip tempconnect.zip -d tempconnect")
|
|
457
|
+
runCMD("cd ${buildDir} && unzip temptealeaf.zip -d temptealeaf")
|
|
458
|
+
runCMD("cd ${buildDir} && unzip tempeocore.zip -d tempeocore")
|
|
459
|
+
|
|
460
|
+
// update asset files
|
|
461
|
+
runCMD("cd ${buildDir} && cp -fr tempconnect/assets/ConnectAdvancedConfig.json android/src/main/assets/ConnectAdvancedConfig.json")
|
|
462
|
+
runCMD("cd ${buildDir} && cp -fr temptealeaf/assets/TealeafBasicConfig.properties android/src/main/assets/TealeafBasicConfig.properties")
|
|
463
|
+
runCMD("cd ${buildDir} && cp -fr temptealeaf/assets/TealeafLayoutConfig.json android/src/main/assets/TealeafLayoutConfig.json")
|
|
464
|
+
runCMD("cd ${buildDir} && cp -fr temptealeaf/assets/TealeafAdvancedConfig.json android/src/main/assets/TealeafAdvancedConfig.json")
|
|
465
|
+
runCMD("cd ${buildDir} && cp -fr tempeocore/assets/EOCoreBasicConfig.properties android/src/main/assets/EOCoreBasicConfig.properties")
|
|
466
|
+
runCMD("cd ${buildDir} && cp -fr tempeocore/assets/EOCoreAdvancedConfig.json android/src/main/assets/EOCoreAdvancedConfig.json")
|
|
467
|
+
|
|
468
|
+
// delete temp files
|
|
469
|
+
runCMD("cd ${buildDir} && rm tempconnect.zip")
|
|
470
|
+
runCMD("cd ${buildDir} && rm temptealeaf.zip")
|
|
471
|
+
runCMD("cd ${buildDir} && rm tempeocore.zip")
|
|
472
|
+
runCMD("cd ${buildDir} && rm -rf tempconnect")
|
|
473
|
+
runCMD("cd ${buildDir} && rm -rf temptealeaf")
|
|
474
|
+
runCMD("cd ${buildDir} && rm -rf tempeocore")
|
|
475
|
+
|
|
476
|
+
// update library version
|
|
477
|
+
def configPath = "${buildDir}/scripts/ConnectConfig.json"
|
|
478
|
+
def configContent = readFile "${configPath}"
|
|
479
|
+
Map jsonContent = (Map) new JsonSlurper().parseText(configContent)
|
|
480
|
+
jsonContent.Connect.put("AndroidVersion", androidConnectLatest)
|
|
481
|
+
//convert maps/arrays to json formatted string
|
|
482
|
+
def json = JsonOutput.toJson(jsonContent)
|
|
483
|
+
json = JsonOutput.prettyPrint(json)
|
|
484
|
+
writeFile(file:"${configPath}", text: json)
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
def getAndroidLatestVersion(isBeta, libName) {
|
|
488
|
+
def mavenLocation = "staging"
|
|
489
|
+
if (!isBeta) {
|
|
490
|
+
mavenLocation = "releases"
|
|
491
|
+
}
|
|
492
|
+
def mavenUrl = "https://s01.oss.sonatype.org/content/repositories/${mavenLocation}/io/github/go-acoustic/${libName}/maven-metadata.xml"
|
|
493
|
+
return runCMD("curl ${mavenUrl} | grep '<latest>.*</latest>' | cut -d '>' -f2 | cut -d '<' -f1")
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
def downloadAndroidLatestVersion(isBeta, libName, libVersion) {
|
|
497
|
+
def mavenLocation = "staging"
|
|
498
|
+
if (!isBeta) {
|
|
499
|
+
mavenLocation = "releases"
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
def mavenUrl = "https://s01.oss.sonatype.org/content/repositories/${mavenLocation}/io/github/go-acoustic/${libName}/${libVersion}/${libName}-${libVersion}.aar"
|
|
503
|
+
// Download files
|
|
504
|
+
runCMD("cd ${buildDir} && curl ${mavenUrl} --output temp${libName}.zip")
|
|
505
|
+
}
|
|
506
|
+
|
|
446
507
|
def runCMD(commnd) {
|
|
447
508
|
echo "${commnd}"
|
|
448
509
|
OUUUTTPT = sh (
|
|
@@ -547,7 +608,6 @@ def publishRelease() {
|
|
|
547
608
|
runCMD("cd ${releaseDir} && git grep -l 'connect-beta' | xargs sed -i '' -e 's/connect-beta/connect/g'")
|
|
548
609
|
runCMD("cd ${releaseDir} && git grep -l 'BETA: ' | xargs sed -i '' -e 's/BETA: //g'")
|
|
549
610
|
runCMD("cd ${releaseDir} && git grep -l 'react-native-acoustic-connect-beta.podspec' | xargs sed -i '' -e 's/react-native-acoustic-connect-beta.podspec/react-native-acoustic-connect.podspec/g'")
|
|
550
|
-
runCMD("cd ${releaseDir} && git grep -l 'https://raw.githubusercontent.com/go-acoustic/Android_Maven/beta' | xargs sed -i '' -e 's/https:\\/\\/raw.githubusercontent.com\\/go-acoustic\\/Android_Maven\\/beta/https:\\/\\/raw.githubusercontent.com\\/go-acoustic\\/Android_Maven\\/master/g'")
|
|
551
611
|
runCMD("mv ${releaseDir}/react-native-acoustic-connect-beta.podspec ${releaseDir}/react-native-acoustic-connect.podspec")
|
|
552
612
|
|
|
553
613
|
// Update package-lock.json
|
package/android/config.gradle
CHANGED
|
@@ -42,7 +42,38 @@ def updateTealeafBasicConfig(mp, json) {
|
|
|
42
42
|
// Just update the following items
|
|
43
43
|
if (config_key == "AppKey" ||
|
|
44
44
|
config_key == "PostMessageUrl" ||
|
|
45
|
-
config_key == "KillSwitchUrl"
|
|
45
|
+
config_key == "KillSwitchUrl" ||
|
|
46
|
+
config_key == "KillSwitchEnabled" ||
|
|
47
|
+
config_key == "KillSwitchMaxNumberOfTries" ||
|
|
48
|
+
config_key == "KillSwitchTimeInterval" ||
|
|
49
|
+
config_key == "UseWhiteList" ||
|
|
50
|
+
config_key == "WhiteListParam" ||
|
|
51
|
+
config_key == "UseRandomSample" ||
|
|
52
|
+
config_key == "RandomSampleParam" ||
|
|
53
|
+
config_key == "PrintScreen" ||
|
|
54
|
+
config_key == "Connection" ||
|
|
55
|
+
config_key == "MaxStringsLength" ||
|
|
56
|
+
config_key == "CookieUrl" ||
|
|
57
|
+
config_key == "CookieParam" ||
|
|
58
|
+
config_key == "CookiePath" ||
|
|
59
|
+
config_key == "CookieDomain" ||
|
|
60
|
+
config_key == "CookieExpires" ||
|
|
61
|
+
config_key == "CookieSecure" ||
|
|
62
|
+
config_key == "CookieExpiresFormat" ||
|
|
63
|
+
config_key == "SessionTimeout" ||
|
|
64
|
+
config_key == "SessionTimeoutKillSwitch" ||
|
|
65
|
+
config_key == "disableTLTDID" ||
|
|
66
|
+
config_key == "ScreenshotFormat" ||
|
|
67
|
+
config_key == "PercentOfScreenshotsSize" ||
|
|
68
|
+
config_key == "PercentToCompressImage" ||
|
|
69
|
+
config_key == "ScreenShotPixelDensity" ||
|
|
70
|
+
config_key == "LogViewLayoutOnScreenTransition" ||
|
|
71
|
+
config_key == "GetImageDataOnScreenLayout" ||
|
|
72
|
+
config_key == "SetGestureDetector" ||
|
|
73
|
+
config_key == "CaptureNativeGesturesOnWebview" ||
|
|
74
|
+
config_key == "LogLocationEnabled" ||
|
|
75
|
+
config_key == "LogLocationTries" ||
|
|
76
|
+
config_key == "LogLocationTimeout" ) {
|
|
46
77
|
println(config_key + "=" + config_value)
|
|
47
78
|
properties.setProperty(config_key, config_value.toString())
|
|
48
79
|
}
|
|
@@ -71,6 +102,155 @@ def updateLayoutConfig(mp, json){
|
|
|
71
102
|
println("Updating:$layoutConfigPath")
|
|
72
103
|
}
|
|
73
104
|
|
|
105
|
+
def updateTealeafAdvConfig(mp, json) {
|
|
106
|
+
def tealeafAdvConfigPath = "$mp/src/main/assets/TealeafAdvancedConfig.json"
|
|
107
|
+
println("Reading file $tealeafAdvConfigPath")
|
|
108
|
+
def jsonSlurper = new JsonSlurper()
|
|
109
|
+
def tealeafAdvConfigData = jsonSlurper.parse(new File(tealeafAdvConfigPath))
|
|
110
|
+
|
|
111
|
+
json.each { key, value ->
|
|
112
|
+
if(key != "Connect"){ return }
|
|
113
|
+
|
|
114
|
+
value.each { config_key, config_value ->
|
|
115
|
+
if(config_value.getClass() != java.lang.String
|
|
116
|
+
&& config_value.getClass() != java.lang.Boolean
|
|
117
|
+
&& config_value.getClass() != java.lang.Integer){
|
|
118
|
+
return
|
|
119
|
+
}
|
|
120
|
+
// Just update the following items
|
|
121
|
+
if (config_key == "AddMessageTypeHeader" ||
|
|
122
|
+
config_key == "ClickEventEnabled" ||
|
|
123
|
+
config_key == "ColorAccent" ||
|
|
124
|
+
config_key == "ColorPrimary" ||
|
|
125
|
+
config_key == "ColorPrimaryDark" ||
|
|
126
|
+
config_key == "DefaultAutoLayoutDelay" ||
|
|
127
|
+
config_key == "DefaultTextViewGravity" ||
|
|
128
|
+
config_key == "DefaultTextViewPaddingLeft" ||
|
|
129
|
+
config_key == "DefaultTextViewPaddingRight" ||
|
|
130
|
+
config_key == "EditTextEnabled" ||
|
|
131
|
+
config_key == "EnableActivityLifeCycleListener" ||
|
|
132
|
+
config_key == "EnableFragmentLifeCycleListener" ||
|
|
133
|
+
config_key == "EnableGestureSwipeLogScreen" ||
|
|
134
|
+
config_key == "EnableScreenshotCache" ||
|
|
135
|
+
config_key == "ExcludeTextViewStyleForOS" ||
|
|
136
|
+
config_key == "ExtendsGoogleWebViewClient" ||
|
|
137
|
+
config_key == "FilterMessageTypes" ||
|
|
138
|
+
config_key == "FlushUpdatedPlaceHolders" ||
|
|
139
|
+
config_key == "GenerateImageHash" ||
|
|
140
|
+
config_key == "GestureConfirmedScreenshotDelay" ||
|
|
141
|
+
config_key == "GoogleWebViewEnabled" ||
|
|
142
|
+
config_key == "InitialZIndex" ||
|
|
143
|
+
config_key == "IpPlaceholder" ||
|
|
144
|
+
config_key == "KillSwitchAsync" ||
|
|
145
|
+
config_key == "KillSwitchDelay" ||
|
|
146
|
+
config_key == "LogFullRequestResponsePayloads" ||
|
|
147
|
+
config_key == "MessageTypeHeader" ||
|
|
148
|
+
config_key == "MessageTypes" ||
|
|
149
|
+
config_key == "NavigationControllerEnabled" ||
|
|
150
|
+
config_key == "RemoveAllCookies" ||
|
|
151
|
+
config_key == "RemoveIp" ||
|
|
152
|
+
config_key == "ScreenViewUnloadDelay" ||
|
|
153
|
+
config_key == "StripDrawableFolderExt" ||
|
|
154
|
+
config_key == "SwitchWidth" ||
|
|
155
|
+
config_key == "TouchEventEnabled" ||
|
|
156
|
+
config_key == "UseXpathId" ||
|
|
157
|
+
config_key == "UseZindex" ||
|
|
158
|
+
config_key == "WebViewDelay" ||
|
|
159
|
+
config_key == "WebViewSetTagForId" ) {
|
|
160
|
+
println(config_key + "=" + config_value)
|
|
161
|
+
tealeafAdvConfigData[config_key] = config_value
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
def tealeafAdvConfigFile = new File(tealeafAdvConfigPath)
|
|
167
|
+
tealeafAdvConfigFile.text = JsonOutput.toJson(tealeafAdvConfigData)
|
|
168
|
+
println("Updating:$tealeafAdvConfigPath")
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
def updateEOCoreBasicConfig(mp, json) {
|
|
172
|
+
def propertiesFile = "$mp/src/main/assets/EOCoreBasicConfig.properties"
|
|
173
|
+
FileInputStream _file = new FileInputStream(propertiesFile);
|
|
174
|
+
Properties properties = new Properties();
|
|
175
|
+
properties.load(_file);
|
|
176
|
+
_file.close();
|
|
177
|
+
|
|
178
|
+
FileOutputStream out = new FileOutputStream(propertiesFile);
|
|
179
|
+
|
|
180
|
+
json.each { key, value ->
|
|
181
|
+
if(key != "Connect"){ return }
|
|
182
|
+
|
|
183
|
+
println("Update/Add the following key/values:")
|
|
184
|
+
value.each { config_key, config_value ->
|
|
185
|
+
if(config_value.getClass() != java.lang.String
|
|
186
|
+
&& config_value.getClass() != java.lang.Boolean
|
|
187
|
+
&& config_value.getClass() != java.lang.Integer){
|
|
188
|
+
return
|
|
189
|
+
}
|
|
190
|
+
// Just update the following items
|
|
191
|
+
if (config_key == "LoggingLevel" ||
|
|
192
|
+
config_key == "DisplayLogging" ||
|
|
193
|
+
config_key == "PersistLocalCache" ||
|
|
194
|
+
config_key == "CachingLevel" ||
|
|
195
|
+
config_key == "PostMessageLevelWiFi" ||
|
|
196
|
+
config_key == "PostMessageLevelCellular" ||
|
|
197
|
+
config_key == "ManualPostEnabled" ||
|
|
198
|
+
config_key == "DoPostOnIntervals" ||
|
|
199
|
+
config_key == "PostMessageTimeInterval") {
|
|
200
|
+
println(config_key + "=" + config_value)
|
|
201
|
+
properties.setProperty(config_key, config_value.toString())
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
properties.store(out, null);
|
|
207
|
+
out.close();
|
|
208
|
+
println("Updating:$propertiesFile")
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
def updateEOCoreAdvConfig(mp, json) {
|
|
212
|
+
def eocoreAdvConfigPath = "$mp/src/main/assets/EOCoreAdvancedConfig.json"
|
|
213
|
+
println("Reading file $eocoreAdvConfigPath")
|
|
214
|
+
def jsonSlurper = new JsonSlurper()
|
|
215
|
+
def eocoreAdvConfigData = jsonSlurper.parse(new File(eocoreAdvConfigPath))
|
|
216
|
+
|
|
217
|
+
json.each { key, value ->
|
|
218
|
+
if(key != "Connect"){ return }
|
|
219
|
+
|
|
220
|
+
value.each { config_key, config_value ->
|
|
221
|
+
if(config_value.getClass() != java.lang.String
|
|
222
|
+
&& config_value.getClass() != java.lang.Boolean
|
|
223
|
+
&& config_value.getClass() != java.lang.Integer){
|
|
224
|
+
return
|
|
225
|
+
}
|
|
226
|
+
// Just update the following items
|
|
227
|
+
if (config_key == "ApplicationBackgroundTimeInterval" ||
|
|
228
|
+
config_key == "ApplicationInBackgroundEnabled" ||
|
|
229
|
+
config_key == "BufferPercent" ||
|
|
230
|
+
config_key == "CachedFileMaxBytesSize" ||
|
|
231
|
+
config_key == "CompressPostMessage" ||
|
|
232
|
+
config_key == "DefaultOrientation" ||
|
|
233
|
+
config_key == "DisableCookieManager" ||
|
|
234
|
+
config_key == "MNCMCC" ||
|
|
235
|
+
config_key == "MaxNumberOfFilesToCache" ||
|
|
236
|
+
config_key == "MessageVersion" ||
|
|
237
|
+
config_key == "OrientationDelayNotificationToModules" ||
|
|
238
|
+
config_key == "OrientationSensorDelay" ||
|
|
239
|
+
config_key == "PostMessageMaxBytesSize" ||
|
|
240
|
+
config_key == "PostMessageSocketTimeout" ||
|
|
241
|
+
config_key == "PostMessageTimeout" ||
|
|
242
|
+
config_key == "TurnOffCorrectOrientationUpdates" ) {
|
|
243
|
+
println(config_key + "=" + config_value)
|
|
244
|
+
eocoreAdvConfigData[config_key] = config_value
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
def eocoreAdvConfigFile = new File(eocoreAdvConfigPath)
|
|
250
|
+
eocoreAdvConfigFile.text = JsonOutput.toJson(eocoreAdvConfigData)
|
|
251
|
+
println("Updating:$eocoreAdvConfigPath")
|
|
252
|
+
}
|
|
253
|
+
|
|
74
254
|
def updateGradle(mp, json){
|
|
75
255
|
def buildGradlePath = "$mp/build.gradle"
|
|
76
256
|
def buildGradleFile = new File(buildGradlePath)
|
|
@@ -104,6 +284,12 @@ try {
|
|
|
104
284
|
println("Step 3:")
|
|
105
285
|
updateLayoutConfig(module_path, configJSONData)
|
|
106
286
|
println("Step 4:")
|
|
287
|
+
updateTealeafAdvConfig(module_path, configJSONData)
|
|
288
|
+
println("Step 5:")
|
|
289
|
+
updateEOCoreBasicConfig(module_path, configJSONData)
|
|
290
|
+
println("Step 6:")
|
|
291
|
+
updateEOCoreAdvConfig(module_path, configJSONData)
|
|
292
|
+
println("Step 7:")
|
|
107
293
|
updateGradle(module_path, configJSONData)
|
|
108
294
|
println("*********************************************************************************************")
|
|
109
295
|
} catch (FileNotFoundException e) {
|