Skip to content

Commit 08ddc0c

Browse files
committed
Merge branch 'update-w-get' of https://github.com/databox/databox-java
2 parents 398911d + 27c3830 commit 08ddc0c

File tree

7 files changed

+484
-383
lines changed

7 files changed

+484
-383
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.yml]
8+
indent_style = space
9+
indent_size = 2
10+
11+
[*.json]
12+
indent_style = space
13+
indent_size = 2
14+
15+
[*.{java,js,css,less,coffee}]
16+
indent_style = space
17+
indent_size = 2

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
language: java
2+
sudo: false
3+
4+
jdk:
5+
- oraclejdk8
6+
- oraclejdk7
27

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Databox Java SDK
22

3-
[![Build Status](https://travis-ci.org/databox/databox-java.svg?branch=master)](https://travis-ci.org/databox/databox-java)
4-
[ ![Download](https://api.bintray.com/packages/databox/databox/databox-sdk/images/download.svg) ](https://bintray.com/databox/databox/databox-sdk/_latestVersion)
3+
[![Build Status][ci-master-image]][ci-master]
4+
[![Download][download-image]][download]
55

66
The Java SDK for interacting with the [Databox](https://databox.com) Push API v 2.0.
77

@@ -76,12 +76,31 @@ try {
7676
}
7777
```
7878

79+
### Retrieving last pushes
80+
81+
```java
82+
Databox databox = new Databox(TOKEN);
83+
try {
84+
StringBuffer lastPush = databox.lastPush(); // just last one
85+
System.out.println(lastPush);
86+
87+
StringBuffer lastPushes = databox.lastPushes(5); // last 5 pushes
88+
System.out.println(lastPushes);
89+
} catch (Exception e) {
90+
logger.error(e.getLocalizedMessage(), e);
91+
}
92+
```
93+
7994
## License
8095

81-
`databox-sdk` is licensed under the [MIT License](LICENSE).
96+
Licensed under the [MIT License](LICENSE).
8297

8398
## Authors
8499

85100
- [Uros Majeric](http://github.com/umajeric)
86101
- [Oto Brglez](http://github.com/otobrglez)
87102

103+
[ci-master]: https://travis-ci.org/databox/databox-java
104+
[ci-master-image]: https://travis-ci.org/databox/databox-java.svg?branch=master
105+
[download]: https://bintray.com/databox/databox/databox-sdk/_latestVersion
106+
[download-image]: https://api.bintray.com/packages/databox/databox/databox-sdk/images/download.svg

build.gradle

Lines changed: 139 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,139 @@
1-
buildscript {
2-
repositories {
3-
jcenter()
4-
}
5-
dependencies {
6-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
7-
}
8-
}
9-
10-
apply plugin: 'java'
11-
apply plugin: 'maven-publish'
12-
apply plugin: 'com.jfrog.bintray'
13-
14-
archivesBaseName = 'databox-sdk'
15-
group = 'com.databox'
16-
version = '2.0'
17-
18-
repositories {
19-
mavenCentral()
20-
}
21-
22-
allprojects {
23-
apply plugin: 'java'
24-
sourceCompatibility = 1.7
25-
targetCompatibility = 1.7
26-
}
27-
28-
dependencies {
29-
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.+'
30-
testCompile group: 'junit', name: 'junit', version: '4.+'
31-
}
32-
33-
bintray {
34-
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : ""
35-
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : ""
36-
// configurations = ['archives']
37-
publications = ['mavenJava']
38-
39-
pkg {
40-
repo = 'databox'
41-
name = 'databox-sdk'
42-
userOrg = 'databox'
43-
licenses = ['MIT']
44-
vcsUrl = 'https://github.com/databox/databox-java.git'
45-
version {
46-
name = '2.0'
47-
desc = 'Databox Java SDK'
48-
released = new Date()
49-
}
50-
}
51-
}
52-
53-
task sourcesJar(type: Jar, dependsOn: classes) {
54-
classifier = 'sources'
55-
from sourceSets.main.allSource
56-
}
57-
58-
task javadocJar(type: Jar, dependsOn: javadoc) {
59-
classifier = 'javadoc'
60-
from javadoc.destinationDir
61-
}
62-
63-
artifacts {
64-
archives sourcesJar, javadocJar
65-
}
66-
67-
def projectUrl = "https://github.com/databox/databox-java"
68-
69-
publishing{
70-
publications {
71-
mavenJava(MavenPublication) {
72-
from components.java
73-
74-
artifact sourcesJar {
75-
classifier "sources"
76-
}
77-
78-
artifact javadocJar {
79-
classifier "javadoc"
80-
}
81-
82-
pom.withXml {
83-
asNode().children().last() + {
84-
resolveStrategy = Closure.DELEGATE_FIRST
85-
name 'Databox Java SDK'
86-
description 'Java SDK for interacting with the Databox Push API.'
87-
url projectUrl
88-
scm {
89-
url projectUrl
90-
connection projectUrl
91-
developerConnection projectUrl
92-
}
93-
licenses {
94-
license {
95-
name 'The MIT License (MIT)'
96-
url 'http://rem.mit-license.org'
97-
distribution 'repo'
98-
}
99-
}
100-
developers {
101-
developer {
102-
id 'otobrglez'
103-
name 'Oto Brglez'
104-
105-
}
106-
}
107-
}
108-
}
109-
}
110-
}
111-
}
112-
1+
buildscript {
2+
repositories {
3+
jcenter()
4+
}
5+
dependencies {
6+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
7+
}
8+
}
9+
10+
apply plugin: 'java'
11+
apply plugin: 'maven-publish'
12+
apply plugin: 'com.jfrog.bintray'
13+
14+
// apply plugin: 'checkstyle'
15+
apply plugin: 'findbugs'
16+
// apply plugin: 'pmd'
17+
18+
def defaultEncoding = 'UTF-8'
19+
[compileJava, compileTestJava]*.options*.encoding = defaultEncoding
20+
21+
archivesBaseName = 'databox-sdk'
22+
group = 'com.databox'
23+
version = '2.1'
24+
25+
repositories {
26+
mavenCentral()
27+
}
28+
29+
allprojects {
30+
apply plugin: 'java'
31+
sourceCompatibility = 1.7
32+
targetCompatibility = 1.7
33+
}
34+
35+
dependencies {
36+
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.+'
37+
testCompile group: 'junit', name: 'junit', version: '4.+'
38+
}
39+
40+
findbugs {
41+
ignoreFailures = true
42+
// toolVersion = "2.0.1"
43+
sourceSets = [sourceSets.main]
44+
// reportsDir = file("$project.buildDir/reports/findbugs")
45+
effort = "min"
46+
}
47+
48+
tasks.withType(FindBugs) {
49+
reportLevel = "high" // high
50+
reports {
51+
xml.enabled = false
52+
html.enabled = true
53+
}
54+
exclude {
55+
'RE_POSSIBLE_UNINTENDED_PATTERN'
56+
'DM_DEFAULT_ENCODING'
57+
}
58+
}
59+
60+
bintray {
61+
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : ""
62+
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : ""
63+
// configurations = ['archives']
64+
publications = ['mavenJava']
65+
66+
pkg {
67+
repo = 'databox'
68+
name = 'databox-sdk'
69+
userOrg = 'databox'
70+
licenses = ['MIT']
71+
vcsUrl = 'https://github.com/databox/databox-java.git'
72+
version {
73+
name = '2.0'
74+
desc = 'Databox Java SDK'
75+
released = new Date()
76+
}
77+
}
78+
}
79+
80+
task sourcesJar(type: Jar, dependsOn: classes) {
81+
classifier = 'sources'
82+
from sourceSets.main.allSource
83+
}
84+
85+
task javadocJar(type: Jar, dependsOn: javadoc) {
86+
classifier = 'javadoc'
87+
from javadoc.destinationDir
88+
}
89+
90+
artifacts {
91+
archives sourcesJar, javadocJar
92+
}
93+
94+
def projectUrl = "https://github.com/databox/databox-java"
95+
96+
publishing {
97+
publications {
98+
mavenJava(MavenPublication) {
99+
from components.java
100+
101+
artifact sourcesJar {
102+
classifier "sources"
103+
}
104+
105+
artifact javadocJar {
106+
classifier "javadoc"
107+
}
108+
109+
pom.withXml {
110+
asNode().children().last() + {
111+
resolveStrategy = Closure.DELEGATE_FIRST
112+
name 'Databox Java SDK'
113+
description 'Java SDK for interacting with the Databox Push API.'
114+
url projectUrl
115+
scm {
116+
url projectUrl
117+
connection projectUrl
118+
developerConnection projectUrl
119+
}
120+
licenses {
121+
license {
122+
name 'The MIT License (MIT)'
123+
url 'http://rem.mit-license.org'
124+
distribution 'repo'
125+
}
126+
}
127+
developers {
128+
developer {
129+
id 'otobrglez'
130+
name 'Oto Brglez'
131+
132+
}
133+
}
134+
}
135+
}
136+
}
137+
}
138+
}
139+

0 commit comments

Comments
 (0)