From d7341f7db5ed18f4a80b914ed8ad58af01bab6dc Mon Sep 17 00:00:00 2001 From: haripriyan Date: Thu, 9 Nov 2023 16:16:41 +0530 Subject: [PATCH 1/2] Updates Billing Library version to 5.2.1 --- app/build.gradle | 1 - .../example/subscription/SubscriptionActivity.kt | 2 +- build.gradle | 4 ++-- chargebee/build.gradle | 15 ++++++++------- .../main/java/com/chargebee/android/Chargebee.kt | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d1613a9..67e8723 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,5 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' android { diff --git a/app/src/main/java/com/chargebee/example/subscription/SubscriptionActivity.kt b/app/src/main/java/com/chargebee/example/subscription/SubscriptionActivity.kt index a8bf45f..c8f9c5c 100644 --- a/app/src/main/java/com/chargebee/example/subscription/SubscriptionActivity.kt +++ b/app/src/main/java/com/chargebee/example/subscription/SubscriptionActivity.kt @@ -39,7 +39,7 @@ class SubscriptionActivity : BaseActivity() { Log.i(javaClass.simpleName, "Subscriptions by using queryParams: $it") if(it?.size!! >0) { val subscriptionStatus = - it?.get(0).cb_subscription.status + "\nPlan Price : " + it?.get(0)?.cb_subscription?.plan_amount; + it?.get(0)?.cb_subscription?.status + "\nPlan Price : " + it?.get(0)?.cb_subscription?.plan_amount; alertSuccess(subscriptionStatus) }else{ alertSuccess("Subscriptions not found in Chargebee System") diff --git a/build.gradle b/build.gradle index d866a33..a2f6fcb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = "1.3.72" + ext.kotlin_version = "1.8.20" ext.assertj_version = '3.16.1' repositories { google() jcenter() } dependencies { - classpath "com.android.tools.build:gradle:4.0.0" + classpath "com.android.tools.build:gradle:4.2.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/chargebee/build.gradle b/chargebee/build.gradle index 838961e..7b2d19a 100644 --- a/chargebee/build.gradle +++ b/chargebee/build.gradle @@ -1,15 +1,14 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 30 + compileSdkVersion 31 defaultConfig { minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 1 - versionName "1.1.0" + versionName "1.2.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" @@ -39,10 +38,10 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7" testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' // Google play billing library - implementation 'com.android.billingclient:billing-ktx:4.0.0' + implementation 'com.android.billingclient:billing-ktx:5.2.1' // AssertJ testImplementation "org.assertj:assertj-core:$assertj_version" @@ -53,7 +52,9 @@ dependencies { // Mockito testImplementation 'org.mockito:mockito-core:2.23.0' - testImplementation 'androidx.test:core:1.2.0' + testImplementation 'androidx.test:core:1.4.0' + + testImplementation 'org.json:json:20140107' testImplementation 'androidx.test.ext:junit:1.1.1' } diff --git a/chargebee/src/main/java/com/chargebee/android/Chargebee.kt b/chargebee/src/main/java/com/chargebee/android/Chargebee.kt index 5ecf590..763ee1f 100644 --- a/chargebee/src/main/java/com/chargebee/android/Chargebee.kt +++ b/chargebee/src/main/java/com/chargebee/android/Chargebee.kt @@ -35,7 +35,7 @@ object Chargebee { var appName: String = "Chargebee" var environment: String = "cb_android_sdk" const val platform: String = "Android" - const val sdkVersion: String = BuildConfig.VERSION_NAME + const val sdkVersion: String = "1.2.0" const val limit: String = "100" private const val PLAY_STORE_SUBSCRIPTION_URL = "https://play.google.com/store/account/subscriptions" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6c9a224..2e6e589 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From c5f2a5e3b2c9d86515bcee547f9cbca5cf6350a0 Mon Sep 17 00:00:00 2001 From: haripriyan Date: Thu, 9 Nov 2023 17:55:59 +0530 Subject: [PATCH 2/2] Updates Readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fadd420..8a7905e 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ Post-installation, initialization, and authentication with the Chargebee site, t ## Requirements The following requirements must be set up before installing Chargebee’s Android SDK. -* Android 5.0 (API level 21) and above -* [Android Gradle Plugin](https://developer.android.com/studio/releases/gradle-plugin) 4.0.0 +* Android Target API Level 31 and above +* [Android Gradle Plugin](https://developer.android.com/studio/releases/gradle-plugin) 4.2.2 * [Gradle](https://gradle.org/releases/) 6.1.1+ * [AndroidX](https://developer.android.com/jetpack/androidx/) * Java 8+ and Kotlin @@ -21,7 +21,7 @@ The following requirements must be set up before installing Chargebee’s Androi The `Chargebee-Android` SDK can be installed by adding below dependency to the `build.gradle` file: ```kotlin -implementation 'com.chargebee:chargebee-android:1.0.25' +implementation 'com.chargebee:chargebee-android:1.2.0' ``` ## Example project