Skip to content
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

docs: ParselyTracker comments to Javadoc style #71

Merged
merged 6 commits into from Sep 15, 2023

Conversation

wzieba
Copy link
Collaborator

@wzieba wzieba commented Sep 14, 2023

Closes #51

Description

This PR updates convention of code comments from Doxygen (dropped in 1bb51a3) with Javadoc. The main benefit is convenience for library users in terms of viewing documentation for highlighted code. See here:

Before After
Screenshot 2023-09-14 at 19 38 23 Screenshot 2023-09-14 at 19 37 31

Not sharing javadoc.jar

I decided to not upload javadoc.jar as part of the artifact during the release because the source code of the SDK is open, so IDE will get comments directly from the source. See #71 (comment)

How to test

  1. Go to latest build details (https://github.com/Parsely/parsely-android/pull/71/checks)
  2. Download build artifact (top right corner)
  3. Unzip it
  4. Find parsely-3.0.8-javadoc.jar
  5. Unzip the file
  6. Check if index.html exist, and has comments. No need to check the content details.

Comment on lines +471 to +472
* To make sure all of the queued events are flushed to Parse.ly's servers,
* call this method in your main activity's `onDestroy()` method.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only place I've modified the content slightly. Previous wording was confusing to me and was referencing the method it's commenting on, which, it seems, is not really correct in Javadoc convention:

image

@wzieba wzieba marked this pull request as ready for review September 14, 2023 17:47
@wzieba
Copy link
Collaborator Author

wzieba commented Sep 15, 2023

@ParaskP7 just FYI - moving this PR to draft for now. I see other open source projects do share javadoc.jar artifacts on maven (e.g. Kotlin stdlib or Dagger) so I think there might be something I don't know and it'll be better to share javadoc.jar for Parsely SDK as well.

@wzieba wzieba marked this pull request as draft September 15, 2023 06:33
Even though it might not be completely neccessary as the SDK is
open source, other open source libraries do share generated javadoc.jar
files so we follow this convention.
@ParaskP7
Copy link
Collaborator

👋 @wzieba !

@ParaskP7 just FYI - moving this PR to draft for now. I see other open source projects do share javadoc.jar artifacts on maven (e.g. Kotlin stdlib or Dagger) so I think there might be something I don't know and it'll be better to share javadoc.jar for Parsely SDK as well.

Seems logical to me, thanks and yes, let's better share a javadoc.jar! 👍

PS: Let me know when you make this PR ready for review so I can take a look.

Dokka, API documentation engine, needs more metaspace space than the
default Gradle value (384m). Increasing it to 2g as suggested by
authors.
@@ -11,6 +11,7 @@
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-XX:MaxMetaspaceSize=2g
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wzieba wzieba marked this pull request as ready for review September 15, 2023 08:22
@wzieba
Copy link
Collaborator Author

wzieba commented Sep 15, 2023

Seems logical to me, thanks and yes, let's better share a javadoc.jar! 👍

👍 @ParaskP7 the PR is now ready for review 🙂

@wzieba wzieba force-pushed the issue/51_update_comments_to_follow_javadoc branch from 7be7ebd to 389186d Compare September 15, 2023 08:55
@ParaskP7 ParaskP7 self-assigned this Sep 15, 2023
Copy link
Collaborator

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @wzieba !

I have reviewed and tested this PR as per the instructions, everything works as expected, good Javadoc job here, kudos! 🌟 ❤️ 🌟

*
* @param queue The list of event dictionaries to serialize
* @param events The list of event dictionaries to serialize
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Praise (❤️): Nice catch! 🥇

*/
//TODO: docs about where we get this UUID from and how.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Praise (❤️): Nicely done so as to not expose the TODO to be part of the documentation. 🥇

@@ -26,6 +26,7 @@ android {
publishing {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question (❓): I wonder whether we should migrate to publish-to-s3-gradle-plugin at some point and use the com.automattic.android.publish-to-s3 plugin instead, just like it is done for the rest of our libraries. 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question! When working on publishing of this library, I was considering our S3 instance but I decided to go with Maven Central because:

  • Risk delegation
    We delegate the risk of "out of service" incidents. If, by some reason, our S3 instance would go down, we would block building apps that use Parse.ly SDK. mavenCentral can possibly go down as well, but then it won't be just Parse.ly SDK, but rather vast majority of every dependency clients' projects have 🙂

Other, less important reasons but still:

  • Trust
    MavenCentral is well known and trusted service for everyone working with Maven/Gradle projects.
  • Repository already included
    The mavenCentral repository is already included in many projects, there's no reason to ask users to add a new repository.
  • Costs
    (guessing) We possibly save costs of our S3 instance (less traffic).

I hope that this argumentation to use Maven Central makes sense!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That all makes sense to me, thanks for the reply and for considering using the com.automattic.android.publish-to-s3 already @wzieba ! 🙇

Base automatically changed from issue/33_69_extradata_in_engagement_session to master September 15, 2023 11:22
@wzieba wzieba merged commit cb0f1c4 into master Sep 15, 2023
1 check passed
@wzieba wzieba deleted the issue/51_update_comments_to_follow_javadoc branch September 15, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Javadoc support
2 participants