Skip to content

Commit 8f82f92

Browse files
Merge pull request #3 from mateusz-bajorek/master
contributing; travis-ci deployment job
2 parents 2c310a3 + 1726b16 commit 8f82f92

File tree

9 files changed

+139
-110
lines changed

9 files changed

+139
-110
lines changed

.travis.yml

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,37 @@
11
sudo: false
22

3-
language: java
4-
5-
jdk:
6-
- oraclejdk8
73
cache:
84
directories:
95
- ~/.m2/repository
106

11-
install: mvn install -P !build-extras -DskipTests=true -Dmaven.javadoc.skip=true -B -V
12-
script: mvn test -P !build-extras -B
7+
language: java
8+
jdk:
9+
- oraclejdk8
10+
11+
install:
12+
- mvn --settings .travis/mvnsettings.xml install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V
1313

14-
after_success:
15-
- ./cd/before-deploy.sh
16-
- ./cd/deploy.sh
14+
before_install:
15+
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
16+
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
17+
18+
deploy:
19+
-
20+
provider: script
21+
script: .travis/deploy.sh
22+
skip_cleanup: true
23+
on:
24+
repo: CurrencyFair/OneSignal-Java-SDK
25+
branch: master
26+
jdk: oraclejdk8
27+
-
28+
provider: script
29+
script: .travis/deploy.sh
30+
skip_cleanup: true
31+
on:
32+
repo: CurrencyFair/OneSignal-Java-SDK
33+
tags: true
34+
jdk: oraclejdk8
1735

1836
notifications:
1937
slack:
@@ -25,14 +43,3 @@ notifications:
2543
2644
on_success: change
2745
on_failure: always
28-
29-
env:
30-
global:
31-
# Ex. travis encrypt SONATYPE_USER=your_sonatype_username
32-
- secure: "UdFsmrAHMJzTND6P7omOByXDmW+qRATl1Kr6oXXrPfdekMtpLgZZpk65gYTF7tpL2ITKc/Kz6WEU0kAkFGAlhaQQ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iPXEng4O2jN12wTZw2qYvSGeUxbSis2EvBEyYs3ohzPd9Zjo69DvgFyTcR5D4C0QLO4GnNtqoHySn39UPkOioetuuYJjdFw7uy0OvacMOINveqGzmiYAD5SGPwbP3Icu8HlykH4eGtBmre2Ey2YODyDjbR1fErPS5ihRRNpxpAtlz4g8EWZ4lQicBbrVAWfZXJWX1b0z7KQFd1DkERBH71oztP9ak6zrMemRHW97tt0t30Et9HWoo9BmQ/sIP7M="
35-
# Ex. travis encrypt GPG_KEY_NAME=your_gpg_email
36-
- secure: "ZeEPrlvihxicTWU+4FojgjBh4wjuqxiyMJ0t4nO2zcNywRZdKcCX1cARzBXvCmQ2opWUKuc3dk5yTs3XuxNKlCEmHFz3YAyKtam6wpmyjWI+2ZqkDxb1ulpJ5zyBTIT5YAeShfz6XJEwKjO309hZw9Kxm8u73PSasavFkj9/50w7RF6bs6w6dIFhVBi74Rdx3wGfW11y/Y39KnRl45/F8rsYQbExn2Idi+OmMvajRpV6HLvXCeKGSevOnsiqAcr4NlUdZhwqFN7QAxhv3Hf64zbawcVQ2Gjuk3r7ByiihG3I/7DB+e8jXI3UND+LUzUwcMUOytXyj2gk4fTex9k/7ysrdNdAE7/MnSXsIFR3+b3kgbzZwCqLQiFFSf+glk0sembcaPJW44AP4BLxbcnoqpN9lGJmnf9xPM2Mmu2RQ83eg0BEcCWEGm6BCK+bCnBAD1JaP7XOkKdoXGBPwHF2a9rEtpdhhYL2D+2bqVyor+rBDLqkwUhiTEiQShMPrQgg5w1EPiU9iNSlZIx3Qidmr5arBvP2LhFfxoJZMv80vhbej0uRR56aByW2mAJLAF0kZsz8MFWgyoN3wUH1YnvgEIlG/nG8NnQ+VZ67jY3u5J19Mv3dzjaYHPMo+VA/uczXAJYnzRaV5UTVTBuhmah8NO+CRyL3nfURMsPErLps1Nw="
37-
# Ex. travis encrypt GPG_PASSPHRASE=your_gpg_password
38-
- secure: "wR3RAAIWiU2A+IzQu58mteMmYDZYlBbIxFmDCtPNc4MJkMUKm7/YT0/qJSo+FChd1AjB7U3e7R7XeWJeituDaDU+gHppIy2TZmhOtzgPMMTnZOKp7AaLTn5LkilzarLhtbiEFkX/t4FG4pABssDJu2E+vk5UhklXwdOFIDZTSE18rVY9gWdob8K9U9A/sS8fPCi66lS/hukmLUTN7gPLxCBWEDg/u+O/Ae79Fh5O5KKNC4XevHPrUKXr1Y/FTQ2BE/myau22Q1w5kYsymsiQVoHDgiBSLvp3R6UqyIBBOEfnKV5YwqGl8BP7wu1mwn/P2kAhMhqMCS/zFLA/5YUwJjymA9pLvqnAIP0EyViFz5eAG21su85NV8B0V3o30aRsht+mF+/9gxpQ2jDcEi0JsFJWzWW+W5NEIcyV6tl8bOlhCKUCcNfolOX+VD3N0PcbiKtN2RSkwapqIAMTTjU9DicQJHe/ULXSq5MTJnUfR+gJiquUhVBUk1ewT0aqwleoOY7LWh6BlksD2tiRzzgUsFSSiN1REXCqS8MprKfKzMuTXn403ZS/CQwKQpcSrYEuBmZMWhlhb8xpUWp0N5PgkTE5dqcTw0YIjpz/DXAN11yoDKVj9RV4ec944yeSY74vLXLTi0ZCeZccdgVLXvvz6jBydf80EXBP499/p05mxws="

.travis/deploy.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
if [ ! -z "$TRAVIS_TAG" ]
3+
then
4+
echo "on a tag -> set pom.xml <version> to $TRAVIS_TAG"
5+
mvn --settings .travis/mvnsettings.xml org.codehaus.mojo:versions-maven-plugin:2.3:set -DnewVersion=$TRAVIS_TAG 1>/dev/null 2>/dev/null
6+
else
7+
echo "not on a tag -> keep snapshot version in pom.xml"
8+
fi
9+
10+
mvn clean deploy --settings .travis/mvnsettings.xml -DskipTests=true -B -U
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
<settings>
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
4+
25
<servers>
36
<server>
7+
<!-- Maven Central Deployment -->
48
<id>ossrh</id>
5-
<username>${env.SONATYPE_USER}</username>
9+
<username>${env.SONATYPE_USERNAME}</username>
610
<password>${env.SONATYPE_PASSWORD}</password>
711
</server>
812
</servers>
@@ -14,10 +18,10 @@
1418
<activeByDefault>true</activeByDefault>
1519
</activation>
1620
<properties>
17-
<gpg.executable>gpg</gpg.executable>
18-
<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname>
21+
<gpg.executable>${env.GPG_EXECUTABLE}</gpg.executable>
1922
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
2023
</properties>
2124
</profile>
2225
</profiles>
26+
2327
</settings>

CONTRIBUTING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Contributing
2+
3+
We love pull requests from everyone. By participating in this project, you
4+
agree to abide by the [Contributor Covenant Code of Conduct](http://contributor-covenant.org/version/1/4/).
5+
6+
Fork, then clone the repo:
7+
8+
```
9+
git clone [email protected]:your-username/OneSignal-Java-SDK.git
10+
```
11+
12+
## Making Changes
13+
14+
* Create a topic branch from where you want to base your work.
15+
* This is usually the master branch.
16+
* To quickly create a topic branch based on master; `git checkout -b my_contribution master`. Please avoid working
17+
directly on the `master` branch.
18+
* Make commits of logical units.
19+
* Make sure your commit messages are descriptive.
20+
* Make sure your code compiles and adheres to CurrencyFair's coding standards: `mvn clean package`
21+
22+
## Submitting Changes
23+
24+
* Push your changes to a topic branch in your fork of the repository.
25+
* [Submit a pull request](https://github.com/CurrencyFair/OneSignal-Java-SDK/compare/).
26+
* The CurrencyFair team will look at your Pull Request. We may suggest some changes or improvements or alternatives.
27+
Your code will be accepted when two people approve the pull request.
28+
* After feedback has been given we expect responses within two weeks. After two weeks we may close the pull request if
29+
it isn't showing any activity.
30+
31+
## Releasing
32+
33+
* Your `pom.xml` should always use SNAPSHOT `<version>x.y.z-SNAPSHOT</version>` version.
34+
* If you push a commit to master of your repository, a new snapshot will be uploaded and is available as `x.y.z-SNAPSHOT`.
35+
* The owner of the repo has to `git tag x.y.z` and `git push --tags` afterwards. This will make `x.y.z` of your library
36+
available at maven central.

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# OneSignal-Java-SDK: Simple OneSignal Java REST client
22

3-
[![Build Status](https://travis-ci.org/CurrencyFair/OneSignal-Java-SDK.svg?branch=master)](https://travis-ci.org/CurrencyFair/OneSignal-Java-SDK)
3+
* Build status [![Build Status](https://travis-ci.org/CurrencyFair/OneSignal-Java-SDK.svg?branch=master)](https://travis-ci.org/CurrencyFair/OneSignal-Java-SDK)
4+
* Latest release [![GitHub version](https://badge.fury.io/gh/CurrencyFair%2FOneSignal-Java-SDK.svg)](https://badge.fury.io/gh/CurrencyFair%2FOneSignal-Java-SDK)
45

56
[OneSignal](https://onesignal.com/) provides Push Notification delivery and automation. This SDK is its unofficial Java REST client library.
67

7-
## Using SDK
8+
## Usage
89
All you need to do is call a method from `com.currencyfair.onesignal.OneSignal` class.
910

1011
This SDK provides easy to use builders for `Notification`, `App`, `Session` and `Device` objects.
@@ -22,6 +23,8 @@ $ mvn install
2223
## Binaries
2324
Binaries and dependency information for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Ccom.currencyfair.onesignal).
2425

26+
Replace `x.y.z` with [![GitHub version](https://badge.fury.io/gh/CurrencyFair%2FOneSignal-Java-SDK.svg)](https://badge.fury.io/gh/CurrencyFair%2FOneSignal-Java-SDK) or current SNAPSHOT version.
27+
2528
Example for Gradle:
2629
```groovy
2730
compile 'com.currencyfair:onesignal:x.y.z'
@@ -35,10 +38,15 @@ and for Maven:
3538
<version>x.y.z</version>
3639
</dependency>
3740
```
41+
3842
and for Ivy:
3943
```xml
4044
<dependency org="com.currencyfair" name="onesignal" rev="x.y.z" />
4145
```
4246

4347
## Bugs and Feedback
4448
For bugs, questions and discussions please use the [Github Issues](https://github.com/CurrencyFair/OneSignal-Java-SDK/issues).
49+
50+
## License
51+
52+
This work is copyright by CurrencyFair (<https://currencyfair.com>) and licensed under the terms of [Apache License, Version 2.0](LICENSE.txt).

cd/before-deploy.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

cd/codesigning.asc.enc

-9.31 KB
Binary file not shown.

cd/deploy.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

pom.xml

Lines changed: 48 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.currencyfair</groupId>
77
<artifactId>onesignal</artifactId>
8-
<version>1.0.5</version>
8+
<version>1.0.5-SNAPSHOT</version>
99

1010
<name>OneSignal Java SDK</name>
1111
<description>OneSignal Java SDK is a java library enabling easy usage of OneSignal REST API</description>
@@ -45,6 +45,10 @@
4545
<id>ossrh</id>
4646
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
4747
</snapshotRepository>
48+
<repository>
49+
<id>ossrh</id>
50+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
51+
</repository>
4852
</distributionManagement>
4953

5054
<issueManagement>
@@ -354,17 +358,6 @@
354358
</configuration>
355359
</plugin>
356360

357-
<plugin>
358-
<artifactId>maven-release-plugin</artifactId>
359-
<version>${maven-release-plugin.version}</version>
360-
<configuration>
361-
<useReleaseProfile>false</useReleaseProfile>
362-
<releaseProfiles>release</releaseProfiles>
363-
<autoVersionSubmodules>true</autoVersionSubmodules>
364-
<tagNameFormat>@${project.version}</tagNameFormat>
365-
</configuration>
366-
</plugin>
367-
368361
<plugin>
369362
<artifactId>maven-jar-plugin</artifactId>
370363
<version>${maven-jar-plugin.version}</version>
@@ -415,6 +408,49 @@
415408
<autoReleaseAfterClose>true</autoReleaseAfterClose>
416409
</configuration>
417410
</plugin>
411+
412+
<plugin>
413+
<groupId>org.apache.maven.plugins</groupId>
414+
<artifactId>maven-gpg-plugin</artifactId>
415+
<version>${maven-gpg-plugin.version}</version>
416+
<executions>
417+
<execution>
418+
<id>sign-artifacts</id>
419+
<phase>verify</phase>
420+
<goals>
421+
<goal>sign</goal>
422+
</goals>
423+
</execution>
424+
</executions>
425+
</plugin>
426+
427+
<plugin>
428+
<groupId>org.apache.maven.plugins</groupId>
429+
<artifactId>maven-source-plugin</artifactId>
430+
<version>${maven-source-plugin.version}</version>
431+
<executions>
432+
<execution>
433+
<id>attach-sources</id>
434+
<goals>
435+
<goal>jar-no-fork</goal>
436+
</goals>
437+
</execution>
438+
</executions>
439+
</plugin>
440+
441+
<plugin>
442+
<groupId>org.apache.maven.plugins</groupId>
443+
<artifactId>maven-javadoc-plugin</artifactId>
444+
<version>${maven-javadoc-plugin.version}</version>
445+
<executions>
446+
<execution>
447+
<id>attach-javadocs</id>
448+
<goals>
449+
<goal>jar</goal>
450+
</goals>
451+
</execution>
452+
</executions>
453+
</plugin>
418454
</plugins>
419455
</build>
420456

@@ -434,65 +470,4 @@
434470
</plugins>
435471
</reporting>
436472

437-
<profiles>
438-
<profile>
439-
<id>sign</id>
440-
<build>
441-
<plugins>
442-
<plugin>
443-
<groupId>org.apache.maven.plugins</groupId>
444-
<artifactId>maven-gpg-plugin</artifactId>
445-
<version>${maven-gpg-plugin.version}</version>
446-
<executions>
447-
<execution>
448-
<id>sign-artifacts</id>
449-
<phase>verify</phase>
450-
<goals>
451-
<goal>sign</goal>
452-
</goals>
453-
</execution>
454-
</executions>
455-
</plugin>
456-
</plugins>
457-
</build>
458-
</profile>
459-
460-
<profile>
461-
<id>build-extras</id>
462-
<activation>
463-
<activeByDefault>true</activeByDefault>
464-
</activation>
465-
<build>
466-
<plugins>
467-
<plugin>
468-
<groupId>org.apache.maven.plugins</groupId>
469-
<artifactId>maven-source-plugin</artifactId>
470-
<version>${maven-source-plugin.version}</version>
471-
<executions>
472-
<execution>
473-
<id>attach-sources</id>
474-
<goals>
475-
<goal>jar-no-fork</goal>
476-
</goals>
477-
</execution>
478-
</executions>
479-
</plugin>
480-
<plugin>
481-
<groupId>org.apache.maven.plugins</groupId>
482-
<artifactId>maven-javadoc-plugin</artifactId>
483-
<version>${maven-javadoc-plugin.version}</version>
484-
<executions>
485-
<execution>
486-
<id>attach-javadocs</id>
487-
<goals>
488-
<goal>jar</goal>
489-
</goals>
490-
</execution>
491-
</executions>
492-
</plugin>
493-
</plugins>
494-
</build>
495-
</profile>
496-
</profiles>
497-
498473
</project>

0 commit comments

Comments
 (0)