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

feat: pull latest changes #38

Merged
merged 144 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
8ee755b
Bump spotless-maven-plugin from 2.14.0 to 2.17.3
dependabot[bot] Nov 1, 2021
71be693
Merge pull request #295 from segmentio/dependabot/maven/com.diffplug.…
pooyaj Nov 10, 2021
d3cfe5a
Initial PR intended as a draft please review approach and let me know…
Nov 11, 2021
bf038aa
Modified logic for size check for each message before adding to queue…
Nov 20, 2021
2e8e61b
ran mvn spotless:apply to fix circlet errors
Nov 20, 2021
d9d0d82
Test case succeeds locally, forcing test to wait to guarantee intera…
Nov 20, 2021
4092824
fix circlet code violation with mvn spotless apply
Nov 20, 2021
75fb976
forced wait to guarantee interaction in test
Nov 20, 2021
5f9ae86
Bump okhttp from 4.3.0 to 4.9.3
dependabot[bot] Nov 22, 2021
ca95853
Bugfix for TLS version error (protocol not supported error)
Dec 8, 2021
7da597e
run maven spotless:apply
Dec 8, 2021
27922cc
Bump spring-boot-autoconfigure from 2.5.5 to 2.6.2
dependabot[bot] Dec 27, 2021
292cbfc
Bump auto.version from 1.8.2 to 1.9
dependabot[bot] Jan 3, 2022
a9810cc
Merge pull request #304 from North-Two-Five/bugfix-tlsversion
pooyaj Jan 5, 2022
dddb9e7
Merge pull request #299 from segmentio/dependabot/maven/com.squareup.…
pooyaj Jan 12, 2022
78e33f3
Merge pull request #307 from segmentio/dependabot/maven/org.springfra…
pooyaj Jan 12, 2022
9503d9b
Bump logging-interceptor from 4.9.1 to 4.9.3
dependabot[bot] Jan 12, 2022
16973ba
Merge pull request #301 from segmentio/dependabot/maven/com.squareup.…
pooyaj Jan 12, 2022
f312214
Bump maven-compiler-plugin from 3.8.1 to 3.9.0
dependabot[bot] Jan 12, 2022
73d7032
Bump kotlin.version from 1.5.31 to 1.6.10
dependabot[bot] Jan 12, 2022
9df49ab
Merge pull request #308 from segmentio/dependabot/maven/auto.version-1.9
pooyaj Jan 26, 2022
73f5f2e
Merge pull request #310 from segmentio/dependabot/maven/kotlin.versio…
pooyaj Jan 26, 2022
12bd554
Bump assertj-core from 3.21.0 to 3.22.0
dependabot[bot] Jan 26, 2022
303c128
Merge pull request #311 from segmentio/dependabot/maven/org.apache.ma…
pooyaj Jan 26, 2022
14e45f1
Bump spring-boot-autoconfigure from 2.6.2 to 2.6.3
dependabot[bot] Jan 26, 2022
de25029
Bump gson from 2.8.8 to 2.8.9
dependabot[bot] Jan 26, 2022
544deb0
Bump spotless-maven-plugin from 2.17.3 to 2.20.0
dependabot[bot] Jan 26, 2022
233affb
Merge pull request #317 from segmentio/dependabot/maven/org.assertj-a…
pooyaj Jan 26, 2022
a506212
Bump mockito-core from 3.12.4 to 4.3.1
dependabot[bot] Jan 26, 2022
666042c
based on PR: https://github.com/segmentio/analytics-java/pull/316
jorgen25 Jan 26, 2022
76550a0
run mvn:spotless apply
jorgen25 Jan 26, 2022
af65553
removed inner loop,sequence counter and modified test cases
jorgen25 Jan 28, 2022
4105183
ran mvn spotless apply`
jorgen25 Jan 28, 2022
20dad36
waiting to confirm interaction on mock
jorgen25 Jan 28, 2022
090dac9
removed hashmap from loop
jorgen25 Feb 1, 2022
7e6903c
ran mvn spotless
jorgen25 Feb 1, 2022
5768c72
Merge pull request #320 from North-Two-Five/fix/maven/org.mockito-moc…
pooyaj Feb 2, 2022
74d0fc6
Merge pull request #319 from segmentio/dependabot/maven/com.google.co…
pooyaj Feb 2, 2022
b6d4616
Merge pull request #318 from segmentio/dependabot/maven/org.springfra…
pooyaj Feb 2, 2022
17a5b2a
Merge pull request #312 from segmentio/dependabot/maven/com.diffplug.…
pooyaj Feb 2, 2022
7e3fc11
Creating PR from https://github.com/segmentio/analytics-java/pull/305/
jorgen25 Feb 10, 2022
181a825
Bump gson from 2.8.9 to 2.9.0
dependabot[bot] Feb 14, 2022
27190a2
Bump spotless-maven-plugin from 2.20.0 to 2.20.2
dependabot[bot] Feb 14, 2022
6ac2949
Bump maven-compiler-plugin from 3.9.0 to 3.10.0
dependabot[bot] Feb 14, 2022
b3c45ef
Merge pull request #323 from North-Two-Five/looper-wont-start-shutdown
pooyaj Feb 16, 2022
d6fc89e
Merge pull request #326 from segmentio/dependabot/maven/org.apache.ma…
pooyaj Feb 16, 2022
e8967da
Merge pull request #325 from segmentio/dependabot/maven/com.diffplug.…
pooyaj Feb 16, 2022
e923b62
Merge pull request #324 from segmentio/dependabot/maven/com.google.co…
pooyaj Feb 16, 2022
0d4a7b4
Merge branch 'master' into bugfix/size-above-limit
nd4p90x Feb 16, 2022
b8eac10
ran mvn spotless:apply
jorgen25 Feb 16, 2022
71fa6e7
Bump spotless-maven-plugin from 2.20.2 to 2.21.0
dependabot[bot] Feb 21, 2022
dad7ca4
Merge pull request #298 from North-Two-Five/bugfix/size-above-limit
pooyaj Feb 23, 2022
dbd4c1b
Bump spring-boot-autoconfigure from 2.6.3 to 2.6.4
dependabot[bot] Feb 28, 2022
a48f47c
Merge pull request #328 from segmentio/dependabot/maven/org.springfra…
pooyaj Mar 2, 2022
8d7e500
Merge pull request #327 from segmentio/dependabot/maven/com.diffplug.…
pooyaj Mar 2, 2022
cdf350c
Bump guava from 31.0-jre to 31.1-jre
dependabot[bot] Mar 7, 2022
7bd56a6
Merge pull request #329 from segmentio/dependabot/maven/com.google.gu…
pooyaj Mar 9, 2022
9d6f807
Bump maven-compiler-plugin from 3.10.0 to 3.10.1
dependabot[bot] Mar 14, 2022
0eb93c6
Bump mockito-core from 4.3.1 to 4.4.0
dependabot[bot] Mar 14, 2022
b3b878e
Merge pull request #331 from segmentio/dependabot/maven/org.mockito-m…
pooyaj Mar 23, 2022
47b34c4
Merge pull request #330 from segmentio/dependabot/maven/org.apache.ma…
pooyaj Mar 23, 2022
16fd898
Removed the line for failure callback method
jorgen25 Mar 25, 2022
22e3109
Bump spring-boot-autoconfigure from 2.6.4 to 2.6.5
dependabot[bot] Mar 28, 2022
d21bbf6
Merge pull request #333 from segmentio/dependabot/maven/org.springfra…
pooyaj Mar 31, 2022
ab0f705
Update pom.xml
pooyaj Mar 31, 2022
7441e0a
fix pom file
pooyaj Apr 1, 2022
afe2f4b
[maven-release-plugin] prepare release analytics-parent-3.2.0
pooyaj Apr 1, 2022
a7b9fcb
[maven-release-plugin] prepare for next development iteration
pooyaj Apr 1, 2022
4d7e197
Bump spotless-maven-plugin from 2.21.0 to 2.22.0
dependabot[bot] Apr 4, 2022
45df423
Merge pull request #332 from North-Two-Five/analytics-callback-failure
pooyaj Apr 6, 2022
3f79618
Merge pull request #335 from segmentio/dependabot/maven/com.diffplug.…
pooyaj Apr 6, 2022
7538ebf
removed wildcards
jorgen25 Apr 7, 2022
0db2200
run spotless
jorgen25 Apr 7, 2022
ee1fc37
Bump spotless-maven-plugin from 2.22.0 to 2.22.1
dependabot[bot] Apr 11, 2022
a912f00
Merge pull request #337 from segmentio/dependabot/maven/com.diffplug.…
pooyaj Apr 20, 2022
a300628
Merge pull request #336 from North-Two-Five/analytics-multiThread-test
pooyaj Apr 20, 2022
5ae39b8
Bump kotlin.version from 1.6.10 to 1.6.21
dependabot[bot] Apr 20, 2022
535aa53
Merge pull request #338 from segmentio/dependabot/maven/kotlin.versio…
pooyaj Apr 20, 2022
3fc0d85
Override method create on Batch class to lend to user define his own …
Apr 29, 2022
8544112
Modify MessageBuilder to lend set sentAt value
May 5, 2022
3ae6d59
Apply spotless library to organize the code
May 5, 2022
8de5e0d
Changed order for params from all AutoValue classes
May 5, 2022
a3645bb
Added value sentAt param on IdentifyMessage
May 5, 2022
7ff5479
Remove Nullable from sentAt om Batch, add Test for sentAt null
May 5, 2022
b578343
Merge pull request #345 from North-Two-Five/340_nullSentAt
pooyaj May 5, 2022
c757d2a
Add throw interrupted exception when event exceeds 32kb to stop Thread
May 11, 2022
2d8836b
Merge pull request #349 from North-Two-Five/fix/issue_341
pooyaj May 11, 2022
9a34ff2
Update the history on CHANGELOG.md to 3.3 version
May 12, 2022
cb8af30
Merge pull request #350 from North-Two-Five/update_changelog_3.3
pooyaj May 12, 2022
fea1c3b
Change line structure from exception on AnalyticsClient
May 30, 2022
69f074c
Merge pull request #354 from North-Two-Five/fix/interrupted_exception…
pooyaj May 31, 2022
54b70f1
Bump assertj-core from 3.22.0 to 3.23.1
dependabot[bot] Jun 6, 2022
5817aa8
Bump logging-interceptor from 4.9.3 to 4.10.0
dependabot[bot] Jun 13, 2022
65062e0
Add test for semerujdk11
Jun 28, 2022
1418f0e
Merge branch 'segmentio:master' into test-semerujdk11
edsonjab Jun 28, 2022
4770dc9
Change validation on BatchTest on createWithSentAtNull
Jun 29, 2022
2c9aa6b
Merge pull request #364 from North-Two-Five/test-semerujdk11
pooyaj Jun 29, 2022
b5ce684
Merge pull request #363 from North-Two-Five/fix_test_update_library
pooyaj Jun 29, 2022
d256425
Merge pull request #357 from segmentio/dependabot/maven/org.assertj-a…
pooyaj Jun 29, 2022
b95ef68
Merge pull request #359 from segmentio/dependabot/maven/com.squareup.…
pooyaj Jun 29, 2022
68dd9fb
Bump mockito-core from 4.4.0 to 4.6.1
dependabot[bot] Jun 29, 2022
62287bb
Bump spotless-maven-plugin from 2.22.1 to 2.23.0  
Jul 6, 2022
a0fc7a6
Merge pull request #368 from North-Two-Five/update_dependabot_libraries
pooyaj Jul 20, 2022
58c5231
Merge pull request #358 from segmentio/dependabot/maven/org.mockito-m…
pooyaj Jul 20, 2022
a82f25b
Update dependabot library and remove semeru image test for circleci
Jul 26, 2022
9e414c9
Update version from gson and spotless-maven-pligun
edsonjab Aug 2, 2022
6e34ae0
Merge pull request #371 from North-Two-Five/update_dependabot_library
pooyaj Aug 3, 2022
e0c2023
[maven-release-plugin] prepare release analytics-parent-3.3.0
pooyaj Aug 11, 2022
79c62ca
[maven-release-plugin] prepare for next development iteration
pooyaj Aug 11, 2022
f25a34b
[maven-release-plugin] prepare release analytics-parent-3.3.1
pooyaj Aug 12, 2022
246ebab
[maven-release-plugin] prepare for next development iteration
pooyaj Aug 12, 2022
ff79567
Update CHANGELOG.md
pooyaj Aug 12, 2022
02f2c18
in dev projects must use -SNAPSHOT or depends on -SNAPSHOT parent (#386)
olamy Oct 14, 2022
779f3fb
Bump spring-boot-autoconfigure from 2.7.2 to 2.7.4 (#382)
dependabot[bot] Oct 14, 2022
5b9cf2e
Bump mockito-core from 4.6.1 to 4.8.0 (#380)
dependabot[bot] Oct 14, 2022
2f89e13
Call upload URL using Retrofit's @Url annotation (#391)
dmenear Nov 16, 2022
d8757cf
Bump mockito-core from 4.8.0 to 4.8.1 (#390)
dependabot[bot] Nov 16, 2022
eee7117
Update libraries to fix test (#392)
edsonjab Nov 16, 2022
e981dd0
Bump spring-boot-autoconfigure from 2.7.4 to 2.7.5 (#389)
dependabot[bot] Nov 23, 2022
f38908b
Merge remote-tracking branch 'base/master' into feat/latestPull
1abhishekpandey Nov 29, 2022
7999756
Merge remote-tracking branch 'base/master' into feat/latestPull
1abhishekpandey Nov 29, 2022
5d4bd29
chore: remove unused code
1abhishekpandey Nov 29, 2022
c36d73b
chore: improve comment
1abhishekpandey Nov 29, 2022
b77f00d
fix: migrate uploading task from `UploadResponse` to `ResponseBody`
1abhishekpandey Nov 30, 2022
1545ac3
feat: add `context` at each message level
1abhishekpandey Dec 1, 2022
7c121d6
chore: bump version to `2.1.0`
1abhishekpandey Dec 1, 2022
bdec7e8
chore: update README.md and refactor code
1abhishekpandey Dec 1, 2022
777c236
refactor: change linkedHashMap to HashMap in Context object
1abhishekpandey Dec 1, 2022
d149901
test: fix context test failure
1abhishekpandey Dec 1, 2022
97ca4ca
feat: add support for `channel` object in individual payload (#41)
1abhishekpandey Dec 19, 2022
bce908f
feat!: bundle the `gzip` support inside the core SDK (#42)
1abhishekpandey Dec 19, 2022
256d4c8
ci: add CI feature (#43)
1abhishekpandey Dec 19, 2022
9f3bf6f
test(AnalyticsClientTest): fix MSG_MAX_CREATE_SIZE size limit
1abhishekpandey Dec 19, 2022
f493468
Revert "chore: bump version to `2.1.0`"
1abhishekpandey Dec 19, 2022
580533f
chore: bump version to `3.0.0`
1abhishekpandey Dec 19, 2022
0998a7b
test(AnalyticsClientTest): fix MSG_MAX_CREATE_SIZE size limit
1abhishekpandey Dec 19, 2022
4e59f86
feat: introduce `setDataPlaneUrl` and mark `endPoint` as deprecated (…
1abhishekpandey Dec 19, 2022
8039296
fix: added tier blocking sample code (#44)
itsdebs Dec 19, 2022
7894d2a
doc: update changelog
1abhishekpandey Dec 19, 2022
94c5529
feat: add getter method for dataPlaneUrl (#46)
1abhishekpandey Dec 20, 2022
da7b998
doc: update readme
1abhishekpandey Dec 20, 2022
15f1c4b
chore(analytics-cli): add setDataPlaneUrl while SDK init
1abhishekpandey Dec 20, 2022
29bccf7
doc: update readme
1abhishekpandey Dec 20, 2022
d4cfd76
chore(analytics-cli): add setDataPlaneUrl while SDK init
1abhishekpandey Dec 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .github/workflows/build-and-quality-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Build & Code Quality Checks

on:
pull_request:
branches: [ 'master', 'develop' ]
types: [ 'opened', 'reopened', 'synchronize' ]

jobs:
unit_test_and_build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 3.8.6

- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar

- name: Setup
run: mvn clean && mvn templating:filter-sources

- name: Unit Test and Build
run: mvn clean install

# - name: Jacoco Badge generator
# uses: cicirello/jacoco-badge-generator@v2
# with:
# generate-summary: true
# jacoco-csv-file: analytics-cli/target/site/jacoco-aggregate/jacoco.csv
#
# - name: Commit and push the badge (if it changed)
# uses: EndBug/add-and-commit@v9.1.1
# with:
# default_author: github_actions
# message: 'commit badge'
# add: '*.svg'

- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: Coverage report
path: |
analytics-cli/target/site/jacoco-aggregate/

- name: PMD lint checking
run: |
mvn pmd:pmd
mvn pmd:cpd

- name: Upload PMD lint report
uses: actions/upload-artifact@v3
with:
name: PMD lint report
path: |
analytics-core/target/site
analytics/target/site

- name: Checkstyle lint checking
run: mvn checkstyle:checkstyle

- name: Upload Checklist lint report
uses: actions/upload-artifact@v3
with:
name: Checklist lint report
path: |
analytics-core/target/site
analytics/target/site

- name: Sonar analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn sonar:sonar
16 changes: 16 additions & 0 deletions .github/workflows/check-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check PR title
on:
pull_request:
branches: [ 'master', 'develop' ]
types: [ 'opened', 'reopened', 'edited', 'synchronize' ]

jobs:
check_pr_title:
name: Check PR title
runs-on: ubuntu-latest
steps:
- name: Checkout source branch
uses: actions/checkout@v3

- name: Check PR title
uses: rudderlabs/github-action-check-pr-title@v1.0.7
55 changes: 55 additions & 0 deletions .github/workflows/notion-pr-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Notion PR Sync

on:
issues:
types:
[
opened,
edited,
deleted,
transferred,
pinned,
unpinned,
closed,
reopened,
assigned,
unassigned,
labeled,
unlabeled,
locked,
unlocked,
milestoned,
demilestoned,
]
pull_request:
types:
[
assigned,
unassigned,
labeled,
unlabeled,
opened,
edited,
closed,
reopened,
synchronize,
converted_to_draft,
ready_for_review,
locked,
unlocked,
review_requested,
review_request_removed,
auto_merge_enabled,
auto_merge_disabled,
]

jobs:
request:
runs-on: ubuntu-latest
steps:
- name: Sync GitHub PRs to Notion
uses: sivashanmukh/github-notion-pr-sync@1.0.0
with:
notionKey: ${{ secrets.NOTION_BOT_KEY }}
notionDatabaseId: ${{ secrets.NOTION_PR_DB_ID }}
githubKey: ${{ secrets.PAT }}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Version 3.0.0 (January 9, 2023)
- [New](https://github.com/rudderlabs/rudder-sdk-java/pull/43) Add CI feature
- [New](https://github.com/rudderlabs/rudder-sdk-java/pull/41) Add support for channel object in individual payload
- [New](https://github.com/rudderlabs/rudder-sdk-java/pull/38) Add library info into the context object at each individual message
- [New](https://github.com/rudderlabs/rudder-sdk-java/pull/45) Introduce setDataPlaneUrl and mark endPoint as deprecated
- [New](https://github.com/rudderlabs/rudder-sdk-java/pull/44) Added tier blocking sample code
- [Breaking change](https://github.com/rudderlabs/rudder-sdk-java/pull/42) Bundle the gzip support inside the core SDK

- [Chore] Dependency upgrades
- [New](https://github.com/rudderlabs/rudder-sdk-java/pull/38) Add option to sentAt field to be null
- [New](https://github.com/rudderlabs/rudder-sdk-java/pull/38) Add throw interrupted exception when event exceeds 32kb to stop Thread

- [Chore] Dependency upgrades
- [Fix](https://github.com/rudderlabs/rudder-sdk-java/pull/38) Batching queue to regard to api limits
- [Fix](https://github.com/rudderlabs/rudder-sdk-java/pull/38) Correctly measure the size of message queue
- [Fix](https://github.com/rudderlabs/rudder-sdk-java/pull/38) Bugfix for TLS version error (protocol not supported error)
- [Fix](https://github.com/rudderlabs/rudder-sdk-java/pull/38) AnalyticsClient Looper won't start if isShutdown is true

# Version 2.0.2 (September 26, 2022)

- [Fix] Removed "v1/import" endpoint
Expand Down
32 changes: 13 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[![Build & Code Quality Checks](https://github.com/rudderlabs/rudder-sdk-java/actions/workflows/build-and-quality-checks.yml/badge.svg?branch=ci%2FaddCIFeatures)](https://github.com/rudderlabs/rudder-sdk-java/actions/workflows/build-and-quality-checks.yml)

# What is RudderStack?

[RudderStack](https://rudderstack.com/) is a **customer data pipeline** tool for collecting, routing and processing data from your websites, apps, cloud tools, and data warehouse.

More information on RudderStack can be found [here](https://github.com/rudderlabs/rudder-server).

## RudderStack's Java SDK

RudderStack’s Java SDK allows you to track your customer event data from your Java code. Once enabled, the event requests hit the RudderStack servers. RudderStack then routes the events to the specified destination platforms as configured by you.

For detailed documentation on the Java SDK, click [here](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-java-sdk/).

## Getting Started with the RudderStack Java SDK

*Add to `pom.xml`:*
Expand All @@ -17,36 +18,27 @@ RudderStack’s Java SDK allows you to track your customer event data from your
<dependency>
<groupId>com.rudderstack.sdk.java.analytics</groupId>
<artifactId>analytics</artifactId>
<version>2.0.2</version>
<version>3.0.0</version>
</dependency>

```

*or if you're using Gradle:*

```bash
implementation 'com.rudderstack.sdk.java.analytics:analytics:2.0.2'
implementation 'com.rudderstack.sdk.java.analytics:analytics:3.0.0'
```

## Initialize ```RudderClient```
## Initializing ```RudderClient```

```java
RudderAnalytics analytics = RudderAnalytics.builder(
"write_key",
"http://data-plane-url"
)
.synchronize(true) // optional (default : false).It is required to block further method invocation until the flush completes.
.plugin(new PluginLog()) // optional. Used for Logging
.build();

...YOUR CODE...

analytics.flush(); // Triggers a flush.
analytics.blockFlush(); //optional. Triggers a flush and block until the flush completes. Required in case of Synchronize. It calls implicitly the `flush` method. So, explicit `flush` call is not required.
analytics.shutdown(); // Shut down after the flush is complete.
RudderAnalytics analytics = RudderAnalytics
.builder("<WRITE_KEY>")
.setDataPlaneUrl("<DATA_PLANE_URL>")
.build();
```

## Send Events
## Sending events

```java
Map<String, Object> map = new HashMap<>();
Expand All @@ -58,6 +50,8 @@ analytics.enqueue(IdentifyMessage.builder()
);
```

For more information on the different types of events supported by the Java SDK, refer to our [docs](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-java-sdk/).

## Contact Us

If you come across any issues while configuring or using this SDK, feel free to start a conversation on our [Slack](https://resources.rudderstack.com/join-rudderstack-slack) channel. We will be happy to help you.
26 changes: 24 additions & 2 deletions analytics-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
<parent>
<artifactId>analytics-parent</artifactId>
<groupId>com.rudderstack.sdk.java.analytics</groupId>
<version>2.0.2</version>
<version>3.0.0</version>
</parent>

<artifactId>analytics-cli</artifactId>
<name>Analytics Java CLI</name>

<properties><sonar.skip>true</sonar.skip></properties>

<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
Expand All @@ -26,6 +28,12 @@
<groupId>com.offbytwo</groupId>
<artifactId>docopt</artifactId>
</dependency>
<!--For aggregate Jacoco coverage report generation: Current module should be executed at last-->
<dependency>
<groupId>com.rudderstack.sdk.java.analytics</groupId>
<artifactId>analytics-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -76,7 +84,21 @@
</execution>
</executions>
</plugin>
<!--To generate the aggregate Jacoco coverage report-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<executions>
<execution>
<id>generate-aggregate-report</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
5 changes: 4 additions & 1 deletion analytics-cli/src/main/kotlin/cli/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ val usage = """
Analytics Java CLI

Usage:
analytics --writeKey=<writeKey> --type=<type> --userId=<userId> [--event=<event>] [--properties=<properties>] [--name=<name>] [--traits=<traits>] [--groupId=<groupId>] [--previousId=<previousId>] [--anonymousId=<anonymousId>] [--integrations=<integrations>] [--context=<context>]
analytics --writeKey=<writeKey> --dataPlaneUrl=<dataPlaneUrl> --type=<type> --userId=<userId> [--event=<event>] [--properties=<properties>] [--name=<name>] [--traits=<traits>] [--groupId=<groupId>] [--previousId=<previousId>] [--anonymousId=<anonymousId>] [--integrations=<integrations>] [--context=<context>]


analytics -h | --help
Expand Down Expand Up @@ -104,9 +104,12 @@ fun main(rawArgs: Array<String>) {

val writeKey = args["--writeKey"] as String

val dataPlaneUrl = args["--dataPlaneUrl"] as String

val phaser = Phaser(1)

val analytics = RudderAnalytics.builder(writeKey)
.setDataPlaneUrl(dataPlaneUrl)
.flushQueueSize(1)
.callback(object : Callback {
override fun success(message: Message?) {
Expand Down
Loading