@capacitor/android 5.4.0 → 5.4.1-nightly-20230919T150525.0
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/capacitor/build.gradle
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
ext {
|
|
2
|
-
androidxActivityVersion = project.hasProperty('androidxActivityVersion') ? rootProject.ext.androidxActivityVersion : '1.7.
|
|
2
|
+
androidxActivityVersion = project.hasProperty('androidxActivityVersion') ? rootProject.ext.androidxActivityVersion : '1.7.2'
|
|
3
3
|
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
|
|
4
4
|
androidxCoordinatorLayoutVersion = project.hasProperty('androidxCoordinatorLayoutVersion') ? rootProject.ext.androidxCoordinatorLayoutVersion : '1.2.0'
|
|
5
|
-
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.10.
|
|
6
|
-
androidxFragmentVersion = project.hasProperty('androidxFragmentVersion') ? rootProject.ext.androidxFragmentVersion : '1.
|
|
7
|
-
androidxWebkitVersion = project.hasProperty('androidxWebkitVersion') ? rootProject.ext.androidxWebkitVersion : '1.
|
|
5
|
+
androidxCoreVersion = project.hasProperty('androidxCoreVersion') ? rootProject.ext.androidxCoreVersion : '1.10.1'
|
|
6
|
+
androidxFragmentVersion = project.hasProperty('androidxFragmentVersion') ? rootProject.ext.androidxFragmentVersion : '1.6.1'
|
|
7
|
+
androidxWebkitVersion = project.hasProperty('androidxWebkitVersion') ? rootProject.ext.androidxWebkitVersion : '1.7.0'
|
|
8
8
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
9
9
|
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
|
|
10
10
|
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
|
|
@@ -13,7 +13,7 @@ ext {
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
buildscript {
|
|
16
|
-
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.
|
|
16
|
+
ext.kotlin_version = project.hasProperty("kotlin_version") ? rootProject.ext.kotlin_version : '1.9.10'
|
|
17
17
|
repositories {
|
|
18
18
|
google()
|
|
19
19
|
mavenCentral()
|
|
@@ -22,7 +22,7 @@ buildscript {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
dependencies {
|
|
25
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
25
|
+
classpath 'com.android.tools.build:gradle:8.1.1'
|
|
26
26
|
|
|
27
27
|
if (System.getenv("CAP_PUBLISH") == "true") {
|
|
28
28
|
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
|
|
@@ -42,10 +42,10 @@ if (System.getenv("CAP_PUBLISH") == "true") {
|
|
|
42
42
|
|
|
43
43
|
android {
|
|
44
44
|
namespace "com.getcapacitor.android"
|
|
45
|
-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
45
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
|
|
46
46
|
defaultConfig {
|
|
47
47
|
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
|
48
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
48
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
|
|
49
49
|
versionCode 1
|
|
50
50
|
versionName "1.0"
|
|
51
51
|
consumerProguardFiles 'proguard-rules.pro'
|
|
@@ -432,9 +432,8 @@ var nativeBridge = (function (exports) {
|
|
|
432
432
|
const tag = `CapacitorHttp fetch ${Date.now()} ${resource}`;
|
|
433
433
|
console.time(tag);
|
|
434
434
|
try {
|
|
435
|
-
// intercept request & pass to the bridge
|
|
436
435
|
const { body, method } = request;
|
|
437
|
-
const { data: requestData, type, headers
|
|
436
|
+
const { data: requestData, type, headers } = await convertBody(body || undefined);
|
|
438
437
|
const optionHeaders = Object.fromEntries(request.headers.entries());
|
|
439
438
|
const nativeResponse = await cap.nativePromise('CapacitorHttp', 'request', {
|
|
440
439
|
url: request.url,
|
|
@@ -586,22 +585,12 @@ var nativeBridge = (function (exports) {
|
|
|
586
585
|
}
|
|
587
586
|
this._headers = nativeResponse.headers;
|
|
588
587
|
this.status = nativeResponse.status;
|
|
589
|
-
const responseString = typeof nativeResponse.data !== 'string'
|
|
590
|
-
? JSON.stringify(nativeResponse.data)
|
|
591
|
-
: nativeResponse.data;
|
|
592
588
|
if (this.responseType === '' ||
|
|
593
589
|
this.responseType === 'text') {
|
|
594
|
-
this.response =
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
type: "application/json",
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
else if (this.responseType === 'arraybuffer') {
|
|
602
|
-
const encoder = new TextEncoder();
|
|
603
|
-
const uint8Array = encoder.encode(responseString);
|
|
604
|
-
this.response = uint8Array.buffer;
|
|
590
|
+
this.response =
|
|
591
|
+
typeof nativeResponse.data !== 'string'
|
|
592
|
+
? JSON.stringify(nativeResponse.data)
|
|
593
|
+
: nativeResponse.data;
|
|
605
594
|
}
|
|
606
595
|
else {
|
|
607
596
|
this.response = nativeResponse.data;
|
|
@@ -46,6 +46,8 @@ import java.util.LinkedList;
|
|
|
46
46
|
import java.util.List;
|
|
47
47
|
import java.util.Map;
|
|
48
48
|
import java.util.Set;
|
|
49
|
+
import java.util.regex.Matcher;
|
|
50
|
+
import java.util.regex.Pattern;
|
|
49
51
|
import org.apache.cordova.ConfigXmlParser;
|
|
50
52
|
import org.apache.cordova.CordovaPreferences;
|
|
51
53
|
import org.apache.cordova.CordovaWebView;
|
|
@@ -290,14 +292,18 @@ public class Bridge {
|
|
|
290
292
|
// Check getCurrentWebViewPackage() directly if above Android 8
|
|
291
293
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
292
294
|
PackageInfo info = WebView.getCurrentWebViewPackage();
|
|
293
|
-
|
|
294
|
-
|
|
295
|
+
Pattern pattern = Pattern.compile("(\\d+)");
|
|
296
|
+
Matcher matcher = pattern.matcher(info.versionName);
|
|
297
|
+
if (matcher.find()) {
|
|
298
|
+
String majorVersionStr = matcher.group(0);
|
|
295
299
|
int majorVersion = Integer.parseInt(majorVersionStr);
|
|
296
|
-
|
|
300
|
+
if (info.packageName.equals("com.huawei.webview")) {
|
|
301
|
+
return majorVersion >= config.getMinHuaweiWebViewVersion();
|
|
302
|
+
}
|
|
303
|
+
return majorVersion >= config.getMinWebViewVersion();
|
|
304
|
+
} else {
|
|
305
|
+
return false;
|
|
297
306
|
}
|
|
298
|
-
String majorVersionStr = info.versionName.split("\\.")[0];
|
|
299
|
-
int majorVersion = Integer.parseInt(majorVersionStr);
|
|
300
|
-
return majorVersion >= config.getMinWebViewVersion();
|
|
301
307
|
}
|
|
302
308
|
|
|
303
309
|
// Otherwise manually check WebView versions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/android",
|
|
3
|
-
"version": "5.4.0",
|
|
3
|
+
"version": "5.4.1-nightly-20230919T150525.0",
|
|
4
4
|
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
|
|
5
5
|
"homepage": "https://capacitorjs.com",
|
|
6
6
|
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"verify": "./gradlew clean lint build test -b capacitor/build.gradle"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@capacitor/core": "^5.4.0"
|
|
26
|
+
"@capacitor/core": "^5.4.0-nightly-20230919T150525.0"
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|