Skip to content

Commit 2b3aa78

Browse files
committed
Capacitor 4 migration
Capacitor 4 migration for android
1 parent fbdc081 commit 2b3aa78

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

android/build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ext {
2-
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.12'
3-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.1'
4-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.2.0'
2+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
4+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
55
}
66

77
buildscript {
@@ -10,17 +10,17 @@ buildscript {
1010
jcenter()
1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:3.6.1'
13+
classpath 'com.android.tools.build:gradle:7.2.1'
1414
}
1515
}
1616

1717
apply plugin: 'com.android.library'
1818

1919
android {
20-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 31
20+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
2121
defaultConfig {
2222
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
23-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 31
23+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
2424
versionCode 1
2525
versionName "1.0"
2626
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -38,7 +38,6 @@ android {
3838

3939
repositories {
4040
google()
41-
jcenter()
4241
mavenCentral()
4342
}
4443

android/src/main/java/com/ionicframework/capacitor/Checkout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void onPaymentSuccess(String s, PaymentData paymentData) {
7070
@Override
7171
public void onPaymentError(int i, String s, PaymentData paymentData) {
7272
try{
73-
lastSavedCall.reject(paymentData.getData().getJSONObject("error").toString(),paymentData.getData().getJSONObject("error").toString(), null);
73+
lastSavedCall.reject(paymentData.getData().getJSONObject("error").toString(),paymentData.getData().getJSONObject("error").toString(), new JSObject());
7474
}catch (Exception e){
7575
e.printStackTrace();
7676
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"author": "sachin.nautiyal@razorpay.com",
1818
"license": "MIT",
1919
"devDependencies": {
20-
"@capacitor/android": "3.1.1",
21-
"@capacitor/core": "3.1.1",
22-
"@capacitor/ios": "3.1.1",
20+
"@capacitor/android": "^4.0.1",
21+
"@capacitor/core": "^4.0.1",
22+
"@capacitor/ios": "^4.0.1",
2323
"@ionic/prettier-config": "^1.0.0",
2424
"@ionic/swiftlint-config": "^1.0.0",
2525
"@rollup/plugin-node-resolve": "^8.1.0",
@@ -31,7 +31,7 @@
3131
"typescript": "~3.8.3"
3232
},
3333
"peerDependencies": {
34-
"@capacitor/core": "^3.1.1"
34+
"@capacitor/core": "^4.0.1"
3535
},
3636
"files": [
3737
"dist/",

0 commit comments

Comments
 (0)