Skip to content

Commit

Permalink
Prepare for release 2.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
vegaro committed May 31, 2019
1 parent 7cfe566 commit 7e1e792
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.2.5

- Removes duplicated makePurchase call in deprecated makePurchase method.

## 2.2.4

- Fixes Proguard issue
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GROUP=com.revenuecat.purchases

VERSION_NAME=2.3.0-SNAPSHOT
VERSION_NAME=2.2.5

POM_DESCRIPTION=Mobile subscriptions in hours, not months.
POM_URL=https://github.com/RevenueCat/purchases-android
Expand Down
2 changes: 1 addition & 1 deletion purchases/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "2.3.0-SNAPSHOT"
versionName "2.2.5"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-proguard-rules.pro'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import com.revenuecat.purchases.util.AdvertisingIdClient
import org.json.JSONException
import org.json.JSONObject
import java.util.ArrayList
import java.util.Collections.emptyMap
import java.util.Date
import java.util.HashMap
import java.util.UUID
Expand Down Expand Up @@ -291,12 +292,6 @@ class Purchases @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) intern

userPurchasing?.let { appUserID ->
billingWrapper.makePurchaseAsync(activity, appUserID, sku, oldSkus, skuType)

billingWrapper.querySkuDetailsAsync(skuType, listOf(sku), {
billingWrapper.makePurchaseAsync(activity, appUserID, sku, oldSkus, skuType)
}, { error ->
listener.onError(error, false)
})
} ?: dispatch {
listener.onError(PurchasesError(PurchasesErrorCode.OperationAlreadyInProgressError), false)
}
Expand Down Expand Up @@ -986,7 +981,7 @@ class Purchases @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) intern
* Current version of the Purchases SDK
*/
@JvmStatic
val frameworkVersion = "2.3.0-SNAPSHOT"
val frameworkVersion = "2.2.5"

/**
* Configures an instance of the Purchases SDK with a specified API key. The instance will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.annotation.Config
import java.util.ArrayList
import java.util.Collections.emptyList
import java.util.ConcurrentModificationException
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit

Expand Down Expand Up @@ -167,13 +169,19 @@ class PurchasesTest {
val sku = "onemonth_freetrial"
val oldSkus = ArrayList<String>()

every {
mockBillingWrapper.querySkuDetailsAsync(any(), any(), captureLambda(), any())
} answers {
lambda<(List<Purchase>) -> Unit>().captured.invoke(listOf(mockk(relaxed = true)))
}

purchases.makePurchaseWith(
activity,
sku,
BillingClient.SkuType.SUBS
) { _, _ -> }

verify {
verify (exactly = 1) {
mockBillingWrapper.makePurchaseAsync(
eq(activity),
eq(appUserId),
Expand Down

0 comments on commit 7e1e792

Please sign in to comment.