-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduces an @InternalRevenueCatAPI
annotation
#1938
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d by ColorInfo as well.
JayShortway
commented
Nov 25, 2024
AnnotationTarget.PROPERTY, | ||
AnnotationTarget.TYPEALIAS, | ||
) | ||
annotation class InternalRevenueCatAPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vegaro
approved these changes
Nov 25, 2024
# Conflicts: # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/ImageComponent.kt # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/PartialComponent.kt # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/StackComponent.kt # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/TextComponent.kt # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/common/Background.kt # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/common/ComponentOverrides.kt # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/common/ComponentsConfig.kt # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/common/Localization.kt # purchases/src/main/kotlin/com/revenuecat/purchases/paywalls/components/common/PaywallComponentsData.kt
This was referenced Nov 28, 2024
JayShortway
pushed a commit
that referenced
this pull request
Dec 2, 2024
**This is an automatic release.** ## RevenueCat SDK ### 🐞 Bugfixes * Uses `Sequence` instead of `Stream` to avoid errors due to unavailable Java 8 APIs (#1943) via JayShortway (@JayShortway) ### 🔄 Other Changes * Increase integration test timeout (#1946) via Toni Rico (@tonidero) * Removes `@RequiresApi(N)` from `FileHelper` and related classes (#1944) via JayShortway (@JayShortway) * [Paywalls V2] Minimizes Java API (#1942) via JayShortway (@JayShortway) * [Paywalls V2] Makes `TextComponent` public (#1939) via JayShortway (@JayShortway) * Introduces an `@InternalRevenueCatAPI` annotation (#1938) via JayShortway (@JayShortway) * [Paywalls V2] Moves any non-component file to a new `common` package. (#1937) via JayShortway (@JayShortway) * [Paywalls V2] `LocalizationKey` is an inline value class now. (#1936) via JayShortway (@JayShortway) * [Paywalls V2] Adds `PaywallComponentsData` (#1935) via JayShortway (@JayShortway) * [Paywalls V2] Adds `StickyFooterComponent` (#1934) via JayShortway (@JayShortway) * [Paywalls V2] Adds `PurchaseButtonComponent` (#1933) via JayShortway (@JayShortway) * [Paywalls V2] Adds `PackageComponent` (#1932) via JayShortway (@JayShortway) * Ensure the correct error message is shown when failing to open a Uri in paywalls (#1922) via JayShortway (@JayShortway) * [Paywalls V2] Adds `ButtonComponent` (#1931) via JayShortway (@JayShortway) * [Paywalls V2] Adds `StackComponent` (#1930) via JayShortway (@JayShortway) * [Paywalls V2] Adds `ComponentOverrides` (#1929) via JayShortway (@JayShortway) * [Paywalls V2] Adds `ImageComponent` (#1928) via JayShortway (@JayShortway) * [Paywalls V2] Adds `TextComponent` (#1927) via JayShortway (@JayShortway) * [Paywalls V2] Adds all enum properties (#1926) via JayShortway (@JayShortway) * [Paywalls V2] Adds `SizeConstraints`, `Size`, `Padding` and `Shadow` properties (#1925) via JayShortway (@JayShortway) * [Paywalls V2] Adds `CornerRadiuses`, `Shape` and `MaskShape` properties (#1924) via JayShortway (@JayShortway) * [Paywalls V2] Adds `ImageUrls` and `ColorInfo` properties (#1923) via JayShortway (@JayShortway) Co-authored-by: revenuecat-ops <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In preparation of having to make the Paywalls V2 types public in
purchases
, sorevenuecatui
can consume them, this PR adds a new@InternalRevenueCatAPI
annotation.Precedence
There's a lot of precedence for using a
@RequiresOptIn
annotation to mark a public API as internal. Some examples:InternalCoroutinesApi
InternalSerializationApi
InternalComposeApi
InternalFoundationApi
Options considered
I experimented a bit with various ways of marking public APIs as internal, and found that using a
@RequiresOptIn
annotation is the only one that can actually fail compilation. All of the options below can be worked around by either opting in or suppressing them. However, that is a conscious decision by the developer.@kotlin.RequiresOptIn
@androidx.annotation.RestrictTo
@androidx.annotation.RequiresOptIn
Also in this PR
revenuecatui
, and for all tests inpurchases
.