Skip to content

Commit

Permalink
Moves JvmStatic annotations to androidMain instead of commonMain.
Browse files Browse the repository at this point in the history
  • Loading branch information
JayShortway committed Jun 20, 2024
1 parent be80594 commit 8c7f877
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public actual class Purchases private constructor(private val androidPurchases:
public actual companion object {

private var _sharedInstance: Purchases? = null

@JvmStatic
public actual val sharedInstance: Purchases
get() = _sharedInstance ?: throw UninitializedPropertyAccessException(
ConfigureStrings.NO_SINGLETON_INSTANCE
Expand Down Expand Up @@ -60,6 +62,7 @@ public actual class Purchases private constructor(private val androidPurchases:
@JvmStatic
public actual var forceUniversalAppStore: Boolean = false

@JvmStatic
public actual fun configure(configuration: PurchasesConfiguration): Purchases {
with(configuration) {
// Using the common configure() call allows us to pass PlatformInfo.
Expand All @@ -82,7 +85,6 @@ public actual class Purchases private constructor(private val androidPurchases:
return Purchases(AndroidPurchases.sharedInstance).also { _sharedInstance = it }
}

@JvmOverloads
@JvmStatic
public actual fun canMakePayments(
features: List<BillingFeature>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import com.revenuecat.purchases.kmp.models.StoreProduct
import com.revenuecat.purchases.kmp.models.StoreProductDiscount
import com.revenuecat.purchases.kmp.models.StoreTransaction
import com.revenuecat.purchases.kmp.models.SubscriptionOption
import kotlin.jvm.JvmOverloads
import kotlin.jvm.JvmStatic

/**
* Entry point for Purchases. This class can be instantiated using [Purchases.configure]. This
Expand All @@ -34,7 +32,6 @@ public expect class Purchases {
* Configure log level. Useful for debugging issues with the lovely team @RevenueCat
* By default, LogLevel.DEBUG in debug builds, and LogLevel.INFO in release builds.
*/
@JvmStatic
public var logLevel: LogLevel

/**
Expand All @@ -43,35 +40,30 @@ public expect class Purchases {
* By default, this sends info, warning, and error messages.
* If you wish to receive Debug level messages, see [logLevel].
*/
@JvmStatic
public var logHandler: LogHandler

/**
* Set this property to your proxy URL before configuring Purchases *only*
* if you've received a proxy key value from your RevenueCat contact.
*/
@JvmStatic
public var proxyURL: String?

/**
* True if `configure` has been called and [sharedInstance] is set
*/
@JvmStatic
public val isConfigured: Boolean

/**
* App Store only. Set this property to true only when testing the ask-to-buy / SCA
* purchases flow. More information [available here](https://rev.cat/ask-to-buy).
*/
@JvmStatic
public var simulatesAskToBuyInSandbox: Boolean

/**
* App Store only. Set this property to true only if you’re transitioning an existing Mac
* app from the Legacy Mac App Store into the Universal Store, and you’ve configured your
* RevenueCat app accordingly. Contact RevenueCat support before using this.
*/
@JvmStatic
public var forceUniversalAppStore: Boolean

/**
Expand All @@ -93,8 +85,6 @@ public expect class Purchases {
* feature support will be checked.
* @param callback Callback that will be notified when the check is complete.
*/
@JvmStatic
@JvmOverloads
public fun canMakePayments(
features: List<BillingFeature> = listOf(),
callback: (Boolean) -> Unit,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:Suppress("ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT")

package com.revenuecat.purchases.kmp

import cocoapods.PurchasesHybridCommon.RCCommonFunctionality
Expand Down

0 comments on commit 8c7f877

Please sign in to comment.