Skip to content

Commit 0b0d8b5

Browse files
authored
Merge pull request #5 from OpenSTFoundation/release-1.0
Release 1.0
2 parents 9bdc77f + 4004a12 commit 0b0d8b5

14 files changed

Lines changed: 253 additions & 79 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,4 @@ fabric.properties
7676
.DS_Store
7777
target
7878

79+
release.properties

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: java
2+
# The cross product of the jdk and env settings form the matrix of builds Travis will run.
3+
jdk:
4+
- oraclejdk8
5+
- oraclejdk9
6+
- openjdk7
7+
- openjdk8
8+
notifications:
9+
email:
10+
recipients:
11+
- ci.report@ost.com
12+
on_success: always
13+
on_failure: always
14+
sudo: false
15+
branches:
16+
only:
17+
- master
18+
- develop
19+
script: mvn clean verify

README.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# OST JavaScript SDK
1+
# OST Java SDK
22
The official [OST Java SDK](https://dev.ost.com/).
33

4+
5+
[![Travis](https://travis-ci.org/OpenSTFoundation/ost-sdk-java.svg?branch=master)](https://travis-ci.org/OpenSTFoundation/ost-sdk-java)
6+
[![Gitter: JOIN CHAT](https://img.shields.io/badge/gitter-JOIN%20CHAT-brightgreen.svg)](https://gitter.im/OpenSTFoundation/SimpleToken)
7+
48
## Requirements
59

610
To use this node module, developers will need to:
@@ -14,12 +18,37 @@ To use this node module, developers will need to:
1418

1519
## Installation
1620

17-
Install OST JavaScript SDK
21+
### Maven users
22+
#### Add this dependency to your project's POM:
23+
```xml
24+
<dependency>
25+
<groupId>com.ost</groupId>
26+
<artifactId>ost-sdk-java</artifactId>
27+
<version>1.0.0</version>
28+
</dependency>
29+
```
30+
31+
### Building from source using Maven
1832

33+
Clone the repository
1934
```bash
20-
> TBD
35+
git clone https://github.com/OpenSTFoundation/ost-sdk-java.git
36+
cd ost-sdk-java
2137
```
2238

39+
40+
Package using MVN (without dependencies)
41+
```bash
42+
mvn clean pacakge -DskipTests
43+
```
44+
45+
With dependencies
46+
```bash
47+
mvn clean compile assembly:single -DskipTests
48+
```
49+
50+
The jar file can be found in the target folder.
51+
2352
## Example Usage
2453

2554

@@ -28,7 +57,7 @@ Initialize the SDK object:
2857
```java
2958
// the latest valid API endpoint is "https://sandboxapi.ost.com/v1/", this may change in the future
3059
HashMap <String,Object> sdkConfig = new HashMap<String,Object>();
31-
sdkConfig.put("apiEndpoint","https://sandboxapi.ost.com/v1/");
60+
sdkConfig.put("apiEndpoint","[V1_API_ENDPOINT]");
3261
sdkConfig.put("apiKey","[YOUR_API_KEY]");
3362
sdkConfig.put("apiSecret","[YOUR_API_SECRET]");
3463
OSTSDK ostObj = new OSTSDK(sdkConfig);
@@ -87,8 +116,8 @@ Execute Airdrop:
87116

88117
```java
89118
HashMap <String,Object> params = new HashMap<String,Object>();
90-
params.put("amount": 1);
91-
params.put("user_ids": "f87346e4-61f6-4d55-8cb8-234c65437b01");
119+
params.put("amount", 1);
120+
params.put("user_ids", "f87346e4-61f6-4d55-8cb8-234c65437b01");
92121
JsonObject response = airdropService.execute( params );
93122
System.out.println("response: " + response.toString() );
94123
```
@@ -97,7 +126,7 @@ Get Airdrop Status:
97126

98127
```java
99128
HashMap <String,Object> params = new HashMap<String,Object>();
100-
params.put("id": 'ecd9b0b2-a0f4-422c-95a4-f25f8fc88334');
129+
params.put("id", 'ecd9b0b2-a0f4-422c-95a4-f25f8fc88334');
101130
JsonObject response = airdropService.get( params );
102131
System.out.println("response: " + response.toString() );
103132
```
@@ -132,7 +161,7 @@ System.out.println("response: " + response.toString() );
132161

133162

134163
```java
135-
com.ost.services.v1.Actions transactionService = services.actions;
164+
com.ost.services.v1.Actions actionService = services.actions;
136165
```
137166

138167
Create a new action:

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.0-beta-1
1+
1.0.0

pom.xml

Lines changed: 134 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,87 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
53
<modelVersion>4.0.0</modelVersion>
6-
74
<groupId>com.ost</groupId>
85
<artifactId>ost-sdk-java</artifactId>
9-
<version>0.9.0-beta-1</version>
6+
<version>1.0.0-SNAPSHOT</version>
7+
<name>OST SDK for Java</name>
8+
<description>The official OST SDK for Java(https://dev.ost.com).</description>
9+
<packaging>jar</packaging>
10+
<url>https://ost.com/</url>
11+
<licenses>
12+
<license>
13+
<name>MIT License</name>
14+
<url>http://www.opensource.org/licenses/mit-license.php</url>
15+
</license>
16+
</licenses>
1017
<build>
1118
<plugins>
19+
<plugin>
20+
<artifactId>maven-assembly-plugin</artifactId>
21+
<configuration>
22+
<descriptorRefs>
23+
<descriptorRef>jar-with-dependencies</descriptorRef>
24+
</descriptorRefs>
25+
</configuration>
26+
</plugin>
27+
<plugin>
28+
<artifactId>maven-deploy-plugin</artifactId>
29+
<version>2.8.2</version>
30+
<executions>
31+
<execution>
32+
<id>default-deploy</id>
33+
<phase>deploy</phase>
34+
<goals>
35+
<goal>deploy</goal>
36+
</goals>
37+
</execution>
38+
</executions>
39+
</plugin>
1240
<plugin>
1341
<groupId>org.apache.maven.plugins</groupId>
14-
<artifactId>maven-compiler-plugin</artifactId>
42+
<artifactId>maven-release-plugin</artifactId>
43+
<version>2.5.3</version>
44+
<configuration>
45+
<localCheckout>true</localCheckout>
46+
<pushChanges>false</pushChanges>
47+
<mavenExecutorId>forked-path</mavenExecutorId>
48+
<arguments>-DskipTests -Dgpg.passphrase=${gpg.passphrase}</arguments>
49+
</configuration>
50+
<dependencies>
51+
<dependency>
52+
<groupId>org.apache.maven.scm</groupId>
53+
<artifactId>maven-scm-provider-gitexe</artifactId>
54+
<version>1.9.5</version>
55+
</dependency>
56+
</dependencies>
57+
</plugin>
58+
<plugin>
59+
<groupId>org.sonatype.plugins</groupId>
60+
<artifactId>nexus-staging-maven-plugin</artifactId>
61+
<version>1.6.8</version>
62+
<extensions>true</extensions>
1563
<configuration>
16-
<source>7</source>
17-
<target>7</target>
64+
<serverId>ossrh</serverId>
65+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
66+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
1867
</configuration>
1968
</plugin>
69+
<plugin>
70+
<groupId>org.apache.maven.plugins</groupId>
71+
<artifactId>maven-source-plugin</artifactId>
72+
<version>3.0.1</version>
73+
<executions>
74+
<execution>
75+
<id>attach-sources</id>
76+
<goals>
77+
<goal>jar</goal>
78+
</goals>
79+
</execution>
80+
</executions>
81+
</plugin>
2082
</plugins>
2183
</build>
22-
<name>OST SDK for Java</name>
23-
<description>The official OST SDK for Java(https://dev.ost.com).</description>
24-
<packaging>jar</packaging>
25-
<url>https://ost.com/</url>
26-
<licenses>
27-
<license>
28-
<name>MIT License</name>
29-
<url>http://www.opensource.org/licenses/mit-license.php</url>
30-
</license>
31-
</licenses>
32-
<developers>
33-
<developer>
34-
<id>ostdev</id>
35-
<organization>OST.COM</organization>
36-
<organizationUrl>https://ost.com/</organizationUrl>
37-
<roles>
38-
<role>developer</role>
39-
</roles>
40-
</developer>
41-
</developers>
42-
<scm>
43-
<connection>scm:git:https://github.com/OpenSTFoundation/ost-sdk-java.git</connection>
44-
<developerConnection>scm:git:git@github.com:OpenSTFoundation/ost-sdk-java.git</developerConnection>
45-
<url>https://github.com/OpenSTFoundation/ost-sdk-java</url>
46-
</scm>
47-
<properties>
48-
<maven.compiler.source>1.6</maven.compiler.source>
49-
<maven.compiler.target>1.6</maven.compiler.target>
50-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
51-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
52-
</properties>
84+
5385
<dependencies>
5486
<dependency>
5587
<groupId>com.google.code.gson</groupId>
@@ -83,4 +115,67 @@
83115
<scope>test</scope>
84116
</dependency>
85117
</dependencies>
118+
<properties>
119+
<maven.compiler.source>1.6</maven.compiler.source>
120+
<maven.compiler.target>1.6</maven.compiler.target>
121+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
122+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
123+
</properties>
124+
<developers>
125+
<developer>
126+
<id>ostdev</id>
127+
<organization>OST.COM</organization>
128+
<organizationUrl>https://ost.com/</organizationUrl>
129+
<roles>
130+
<role>developer</role>
131+
</roles>
132+
</developer>
133+
</developers>
134+
<scm>
135+
<connection>scm:git:https://github.com/OpenSTFoundation/ost-sdk-java.git</connection>
136+
<developerConnection>scm:git:git@github.com:OpenSTFoundation/ost-sdk-java.git</developerConnection>
137+
<url>https://github.com/OpenSTFoundation/ost-sdk-java</url>
138+
<tag>HEAD</tag>
139+
</scm>
140+
<distributionManagement>
141+
<snapshotRepository>
142+
<id>ossrh</id>
143+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
144+
</snapshotRepository>
145+
<repository>
146+
<id>ossrh</id>
147+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/
148+
</url>
149+
</repository>
150+
</distributionManagement>
151+
<profiles>
152+
<!-- GPG Signature on release -->
153+
<profile>
154+
<id>release-sign-artifacts</id>
155+
<activation>
156+
<property>
157+
<name>performRelease</name>
158+
<value>true</value>
159+
</property>
160+
</activation>
161+
<build>
162+
<plugins>
163+
<plugin>
164+
<groupId>org.apache.maven.plugins</groupId>
165+
<artifactId>maven-gpg-plugin</artifactId>
166+
<version>1.6</version>
167+
<executions>
168+
<execution>
169+
<id>sign-artifacts</id>
170+
<phase>verify</phase>
171+
<goals>
172+
<goal>sign</goal>
173+
</goals>
174+
</execution>
175+
</executions>
176+
</plugin>
177+
</plugins>
178+
</build>
179+
</profile>
180+
</profiles>
86181
</project>

0 commit comments

Comments
 (0)