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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ jobs:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- name: Publish build artifacts
uses: actions/upload-artifact@v3
with:
name: artifact
path: ~/.m2/repository/com/parsely/parsely/*
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.


# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand Down
1 change: 1 addition & 0 deletions parsely/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 ! 🙇

singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,29 @@
import java.util.HashMap;
import java.util.Map;

/*! \brief Represents post metadata to be passed to Parsely tracking.
*
* This class is used to attach a metadata block to a Parse.ly pageview
* request. Pageview metadata is only required for URLs not accessible over the
* internet (i.e. app-only content) or if the customer is using an "in-pixel" integration.
* Otherwise, metadata will be gathered by Parse.ly's crawling infrastructure.
/**
* Represents post metadata to be passed to Parsely tracking.
* <p>
* This class is used to attach a metadata block to a Parse.ly pageview
* request. Pageview metadata is only required for URLs not accessible over the
* internet (i.e. app-only content) or if the customer is using an "in-pixel" integration.
* Otherwise, metadata will be gathered by Parse.ly's crawling infrastructure.
*/
public class ParselyMetadata {
public ArrayList<String> authors, tags;
public String link, section, thumbUrl, title;
public Calendar pubDate;

/* \brief Create a new ParselyMetadata object.
/**
* Create a new ParselyMetadata object.
*
* @param authors The names of the authors of the content. Up to 10 authors are accepted.
* @param link A post's canonical url.
* @param section The category or vertical to which this content belongs.
* @param tags User-defined tags for the content. Up to 20 are allowed.
* @param thumbUrl URL at which the main image for this content is located.
* @param title The title of the content.
* @param pubDate The date this piece of content was published.
* @param authors The names of the authors of the content. Up to 10 authors are accepted.
* @param link A post's canonical url.
* @param section The category or vertical to which this content belongs.
* @param tags User-defined tags for the content. Up to 20 are allowed.
* @param thumbUrl URL at which the main image for this content is located.
* @param title The title of the content.
* @param pubDate The date this piece of content was published.
*/
public ParselyMetadata(
@Nullable ArrayList<String> authors,
Expand All @@ -47,7 +49,8 @@ public ParselyMetadata(
this.pubDate = pubDate;
}

/* \brief Turn this object into a Map
/**
* Turn this object into a Map
*
* @return a Map object representing the metadata.
*/
Expand Down