Skip to content

Commit fd333f0

Browse files
🪴 CI/CD Pipeline
1 parent f7e0bcb commit fd333f0

File tree

7 files changed

+385
-421
lines changed

7 files changed

+385
-421
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish package to the Maven Central Repository
2+
on:
3+
release:
4+
types: [ created ]
5+
push:
6+
jobs:
7+
publish-maven:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Set up Maven Central Repository
12+
uses: actions/setup-java@v3
13+
with:
14+
java-version: '8'
15+
distribution: 'adopt'
16+
server-id: shaileshmishra
17+
server-username: MAVEN_USERNAME
18+
server-password: MAVEN_PASSWORD
19+
gpg-passphrase: GPG_PASSPHRASE
20+
- name: Publish package
21+
run: mvn --batch-mode deploy
22+
env:
23+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
24+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
25+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
26+
publish-github:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v3
30+
- name: Set up Java for publishing to GitHub Packages
31+
uses: actions/setup-java@v3
32+
with:
33+
java-version: '8'
34+
distribution: 'adopt'
35+
server-id: github
36+
- name: Publish to GitHub Packages
37+
run: mvn --batch-mode deploy
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414

1515
<properties>
16-
<sdk.version.release>1.10.1-SNAPSHOT</sdk.version.release>
16+
<sdk.version.release>1.10.2-SNAPSHOT</sdk.version.release>
1717
<maven.compiler.target>1.8</maven.compiler.target>
1818
<maven.compiler.source>1.8</maven.compiler.source>
1919
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2020
<surefire-report-plugin.version>2.22.0</surefire-report-plugin.version>
2121
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
22-
<maven-javadoc-plugin.version>3.3.2</maven-javadoc-plugin.version>
23-
<dotenv-source.version>2.2.4</dotenv-source.version>
22+
<maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
23+
<dotenv-source.version>2.3.1</dotenv-source.version>
2424
<rxjava-source.version>3.1.5</rxjava-source.version>
2525
<retrofit-source.version>2.9.0</retrofit-source.version>
2626
<converter-gson-source.version>2.9.0</converter-gson-source.version>
@@ -35,12 +35,10 @@
3535
<maven-site-plugin.version>3.3</maven-site-plugin.version>
3636
<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
3737
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
38-
<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
39-
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
38+
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
4039
<json-version>20220924</json-version>
4140
<jacoco-maven-plugin-version>0.8.7</jacoco-maven-plugin-version>
4241
<maven-release-plugin-version>2.5.3</maven-release-plugin-version>
43-
<nexus-staging-maven-plugin-version>1.6.7</nexus-staging-maven-plugin-version>
4442
<contentstack-utils-version>1.2.0</contentstack-utils-version>
4543
</properties>
4644

@@ -211,6 +209,8 @@
211209
<goal>jar</goal>
212210
</goals>
213211
<configuration>
212+
<stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
213+
<show>public</show>
214214
<additionalOptions>-Xdoclint:none</additionalOptions>
215215
<use>false</use>
216216
<use>false</use>

src/main/java/com/contentstack/sdk/ContentType.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public Query query() {
132132
* the params
133133
* @param callback
134134
* the callback
135+
* @throws IllegalAccessException illegal access exception
135136
*/
136137
public void fetch(@NotNull JSONObject params, final ContentTypesCallback callback) throws IllegalAccessException {
137138
String urlString = "content_types/" + contentTypeUid;

src/main/java/com/contentstack/sdk/Entry.java

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ public Entry configure(JSONObject jsonObject) {
7272
* <b>Example :</b><br>
7373
*
7474
* <pre class="prettyprint">
75-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
76-
* Entry entry = stack.contentType("form_name").entry("entry_uid");
77-
* entry.setHeader("custom_header_key", "custom_header_value");
78-
* </pre>
75+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
76+
* Entry entry = stack.contentType("form_name").entry("entry_uid");
77+
* entry.setHeader("custom_header_key", "custom_header_value");
78+
* </pre>
7979
*/
8080

8181
public void setHeader(String key, String value) {
@@ -93,10 +93,10 @@ public void setHeader(String key, String value) {
9393
* <b>Example :</b><br>
9494
*
9595
* <pre class="prettyprint">
96-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
97-
* Entry entry = stack.contentType("form_name").entry("entry_uid");
98-
* entry.removeHeader("custom_header_key");
99-
* </pre>
96+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
97+
* Entry entry = stack.contentType("form_name").entry("entry_uid");
98+
* entry.removeHeader("custom_header_key");
99+
* </pre>
100100
*/
101101

102102
public void removeHeader(String key) {
@@ -244,8 +244,8 @@ public JSONObject toJSON() {
244244
* <b>Example :</b><br>
245245
*
246246
* <pre class="prettyprint">
247-
* Object obj = entry.get("key");
248-
* </pre>
247+
* Object obj = entry.get("key");
248+
* </pre>
249249
* @return Object @resultJson
250250
*/
251251
public Object get(@NotNull String key) {
@@ -261,8 +261,8 @@ public Object get(@NotNull String key) {
261261
* <b>Example :</b><br>
262262
*
263263
* <pre class="prettyprint">
264-
* String value = entry.getString("key");
265-
* </pre>
264+
* String value = entry.getString("key");
265+
* </pre>
266266
* @return String @getString
267267
*/
268268

@@ -283,8 +283,8 @@ public String getString(@NotNull String key) {
283283
* <b>Example :</b><br>
284284
*
285285
* <pre class="prettyprint">
286-
* Boolean value = entry.getBoolean("key");
287-
* </pre>
286+
* Boolean value = entry.getBoolean("key");
287+
* </pre>
288288
* @return boolean @getBoolean
289289
*/
290290

@@ -305,8 +305,8 @@ public Boolean getBoolean(@NotNull String key) {
305305
* <b>Example :</b><br>
306306
*
307307
* <pre class="prettyprint">
308-
* JSONArray value = entry.getJSONArray("key");
309-
* </pre>
308+
* JSONArray value = entry.getJSONArray("key");
309+
* </pre>
310310
* @return JSONArray @getJSONArray
311311
*/
312312

@@ -327,8 +327,8 @@ public JSONArray getJSONArray(@NotNull String key) {
327327
* <b>Example :</b><br>
328328
*
329329
* <pre class="prettyprint">
330-
* JSONObject value = entry.getJSONObject("key");
331-
* </pre>
330+
* JSONObject value = entry.getJSONObject("key");
331+
* </pre>
332332
* @return JSONObject @getJSONObject
333333
*/
334334
public JSONObject getJSONObject(@NotNull String key) {
@@ -348,8 +348,8 @@ public JSONObject getJSONObject(@NotNull String key) {
348348
* <b>Example :</b><br>
349349
*
350350
* <pre class="prettyprint">
351-
* JSONObject value = entry.getJSONObject("key");
352-
* </pre>
351+
* JSONObject value = entry.getJSONObject("key");
352+
* </pre>
353353
* @return Number @getNumber
354354
*/
355355

@@ -370,8 +370,8 @@ public Number getNumber(@NotNull String key) {
370370
* <b>Example :</b><br>
371371
*
372372
* <pre class="prettyprint">
373-
* int value = entry.getInt("key");
374-
* </pre>
373+
* int value = entry.getInt("key");
374+
* </pre>
375375
* @return int @getInt
376376
*/
377377

@@ -436,8 +436,8 @@ public double getDouble(@NotNull String key) {
436436
* <b>Example :</b><br>
437437
*
438438
* <pre class="prettyprint">
439-
* long value = entry.getLong("key");
440-
* </pre>
439+
* long value = entry.getLong("key");
440+
* </pre>
441441
* @return long @getLong
442442
*/
443443

@@ -460,8 +460,8 @@ public long getLong(@NotNull String key) {
460460
* <b>Example :</b><br>
461461
*
462462
* <pre class="prettyprint">
463-
* short value = entry.getShort("key");
464-
* </pre>
463+
* short value = entry.getShort("key");
464+
* </pre>
465465
* @return short @getShort
466466
*/
467467
public short getShort(@NotNull String key) {
@@ -481,8 +481,8 @@ public short getShort(@NotNull String key) {
481481
* <b>Example :</b><br>
482482
*
483483
* <pre class="prettyprint">
484-
* Calendar value = entry.getDate("key");
485-
* </pre>
484+
* Calendar value = entry.getDate("key");
485+
* </pre>
486486
* @return Calendar @getDate
487487
*/
488488

@@ -664,9 +664,9 @@ public List<Asset> getAssets(String key) {
664664
* <b>Example :</b><br>
665665
*
666666
* <pre class="prettyprint">
667-
* Group innerGroup = entry.getGroup("key");
668-
* return null
669-
* </pre>
667+
* Group innerGroup = entry.getGroup("key");
668+
* return null
669+
* </pre>
670670
* @return {@link Group}
671671
*/
672672
public Group getGroup(String key) {
@@ -947,16 +947,16 @@ public Entry exceptWithReferenceUid(@NotNull ArrayList<String> fieldUid, @NotNul
947947
* <b>Example :</b><br>
948948
*
949949
* <pre class="prettyprint">
950-
* {@code
951-
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
952-
* Entry entry = stack.contentType("form_name").entry("entry_uid");<br>
953-
* entry.fetch(new EntryResultCallBack() {<br>
954-
* &#64;Override
955-
* public void onCompletion(ResponseType responseType, Error error) {
956-
* }<br>
957-
* });<br>
958-
* }
959-
* </pre>
950+
* {@code
951+
* Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
952+
* Entry entry = stack.contentType("form_name").entry("entry_uid");<br>
953+
* entry.fetch(new EntryResultCallBack() {<br>
954+
* &#64;Override
955+
* public void onCompletion(ResponseType responseType, Error error) {
956+
* }<br>
957+
* });<br>
958+
* }
959+
* </pre>
960960
*/
961961

962962
public void fetch(EntryResultCallBack callback) {

src/main/java/com/contentstack/sdk/IRequestModelHTTP.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import org.json.JSONObject;
44

5+
/**
6+
* IRequestModelHTTP Interface
7+
*/
58
public interface IRequestModelHTTP {
69

710
void sendRequest();

0 commit comments

Comments
 (0)