-
Notifications
You must be signed in to change notification settings - Fork 181
chore: Add GoogleMapComposable annotation. #130
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package com.google.maps.android.compose | ||
|
|
||
| import androidx.compose.runtime.ComposableTargetMarker | ||
|
|
||
| /** | ||
| * An annotation that can be used to mark a composable function as being expected to be use in a | ||
| * composable function that is also marked or inferred to be marked as a [GoogleMapComposable]. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd suggest adding in the Javadoc the result of using the annotation, which you have in the PR comment. Something like:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 2f27a84 |
||
| * | ||
| * This will produce build warnings when [GoogleMapComposable] composable functions are used outside | ||
| * of a [GoogleMapComposable] content lambda, and vice versa. | ||
| */ | ||
| @Retention(AnnotationRetention.BINARY) | ||
| @ComposableTargetMarker(description = "Google Map Composable") | ||
| @Target( | ||
| AnnotationTarget.FILE, | ||
| AnnotationTarget.FUNCTION, | ||
| AnnotationTarget.PROPERTY_GETTER, | ||
| AnnotationTarget.TYPE, | ||
| AnnotationTarget.TYPE_PARAMETER, | ||
| ) | ||
| public annotation class GoogleMapComposable | ||
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.
Looks like 2.2.0 isn't published yet. FYI @barbeau @wangela
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.
Thanks @arriolac, it should now be available:
https://search.maven.org/artifact/com.google.maps.android/maps-compose