Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

update sample code #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

update sample code #1

wants to merge 1 commit into from

Conversation

spacedsweden
Copy link
Member

No description provided.

@spacedsweden spacedsweden requested a review from Krattan March 19, 2021 05:04
String clientId="__clientId__";
String clientSecret="__clientSecret__";
String projectId="__projectId__";
String appId = "__appId__"
Copy link

@Krattan Krattan Mar 19, 2021

Choose a reason for hiding this comment

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

spaces around the = for all variables

<dependencies>
<dependency>
<groupId>com.sinch.sdk</groupId>
<artifactId>java-sdk</artifactId>
<version>${sdk.version}</version>
<version>LATEST</version>
Copy link
Collaborator

@abialas abialas Mar 19, 2021

Choose a reason for hiding this comment

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

You will get warning while building with this version LATEST because it has been deprecated. Maven suggests to use specific version to have stability of the builds. Thats why we used property sdk.version

dependencies.dependency.version' for com.sinch.sdk:java-sdk:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 22, column 14

This is also knows as bad practice as build becomes a "lottery" so maybe we should stay with sdk.version in the doc?

Copy link
Member Author

Choose a reason for hiding this comment

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

if so it should alwasy be updated to the current version, or maybe have the wildcard 0.1.+ to get minor versions automatically?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would say this is a basic knowledge how to update versions of dependencies for someone who is using maven / gradle. So IMO what we had at the beginning was ok. But this is only my suggestion.

Copy link

Choose a reason for hiding this comment

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

I agree with Adam, if you think this really needs clarifying I would suggest a potential middle road being changing the 'variable' to be more descriptive, somehow pointing the user to the current version on maven that we display at the start of the readme.

Messages messages =
Sinch.conversationApi(Region.US) // The region of the app
.messages(appId);
messages.send(new TextMessageRequest("Hi from the Sinch SDK!")
Copy link

Choose a reason for hiding this comment

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

potentially add a newline here to clearly mark it as a separate step

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants