Skip to content

Commit 6a69f56

Browse files
author
Damian Staszewski
authored
Merge pull request #49 from stachu540/dev
2 parents 8d5dd8c + e9d9916 commit 6a69f56

File tree

121 files changed

+2813
-1569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2813
-1569
lines changed

.github/ISSUES_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ possible. Thank you!
1111
-->
1212
### Versioning
1313
**Version**: <!-- Package version -->
14+
1415
**OS Platform**: <!-- Operating system version with platform (x86 or x64) -->
16+
1517
**Java Version ( >= 1.8 )**: <!-- Recommending using Java 8, Specify Java Build version -->
1618

1719
### Description
1820

1921
<!-- Describe exactly your problem. For codes or console logs use tripple backquote (`)
2022
For example:
2123
```java
22-
package pl.stachuofficial.examples
24+
package com.examples
2325
public class ExampleTest {
2426
public static void main(String[] args){
2527
System.out.println("This is a example compiled text.")

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
<!--- Include details of your testing environment, and the tests you ran to -->
1515
<!--- see how your change affects other areas of the code, etc. -->
1616
**IDE:**
17+
1718
**OS Platform:**
19+
1820
**Java Version:**
19-
**Maven Version:**
21+
22+
**Gradle Version:**
2023

2124
### Screenshots (optional):

.gitignore

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Maven template
3-
target/
4-
pom.xml.tag
5-
pom.xml.releaseBackup
6-
pom.xml.versionsBackup
7-
pom.xml.next
8-
release.properties
9-
dependency-reduced-pom.xml
10-
buildNumber.properties
11-
.mvn/timing.properties
12-
13-
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
14-
!/.mvn/wrapper/maven-wrapper.jar
15-
16-
!.github/
17-
18-
### JetBrains
19-
.idea/**
1+
.idea
202
*.iml
21-
22-
src/test/java/com/github/stachu540/hirezapi/*.java
23-
!src/test/java/com/github/stachu540/hirezapi/HiRezAPITest.java
3+
out/
4+
.gradle
5+
build/
6+
logs/

.travis.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@ language: java
22
jdk:
33
- oraclejdk8
44

5+
before_cache:
6+
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
7+
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
58
cache:
69
directories:
7-
- ~/.m2/repository
10+
- $HOME/.gradle/caches/
11+
- $HOME/.gradle/wrapper/
812

9-
install:
10-
- mvn install -Dmaven.javadoc.skip=true -P !build-extras -B
11-
- mvn dependency:go-offline -Dmaven.javadoc.skip=true -P !build-extras -B
13+
before_install:
14+
- chmod +x ./gradlew
1215
script:
13-
- mvn test -DskipTest=false -Dmaven.javadoc.skip=true -P !build-extras -B
14-
- mvn cobertura:cobertura -Dmaven.javadoc.skip=true -P !build-extras -B
15-
after_success:
16-
- mvn codacy:coverage -Dmaven.javadoc.skip=true -P !build-extras -B
16+
- ./gradlew test
17+
18+
deploy:
19+
- provider: script
20+
script: ./gradlew bintrayUpload
21+
on:
22+
tags: true

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[![Build Status](https://travis-ci.org/stachu540/HiRezAPI.svg)](https://travis-ci.org/stachu540/HiRezAPI)
2+
[![Libraries.io](https://img.shields.io/librariesio/github/stachu540/HiRezAPI.svg)](https://libraries.io/github/stachu540/HiRezAPI)
23
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ee16a92996a3425d87403780aa18f316)](https://www.codacy.com/app/stachu540/HiRezAPI?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=stachu540/HiRezAPI&amp;utm_campaign=Badge_Grade)
3-
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/ee16a92996a3425d87403780aa18f316)](https://www.codacy.com/app/stachu540/HiRezAPI?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=stachu540/HiRezAPI&amp;utm_campaign=Badge_Coverage)
44
[![Javadocs](https://img.shields.io/badge/Javadoc-v2.0.1-brightgreen.svg)](https://jitpack.io/com/github/stachu540/HiRezAPI/v2.0.1/javadoc/)
55
[![Release](https://jitpack.io/v/stachu540/HiRezAPI.svg)](https://jitpack.io/#stachu540/HiRezAPI)
66

77
# HiRezAPI
88

99
Java-Based API Wrapper for Hi-Rez Studios games. Currently supports:
1010
* [Smite](https://smitegame.com/)
11-
* [Paladins](https://paladinsgame.com/)
11+
* [Paladins](https://paladins.com/)
1212

1313
## Features
1414

@@ -27,37 +27,39 @@ Add to `pom.xml` build.
2727
<repositories>
2828
...
2929
<repository>
30-
<id>jitpack.io</id>
31-
<url>https://jitpack.io</url>
30+
<id>jcenter</id>
31+
<url>https://jcenter.bintray.com</url>
3232
</repository>
3333
</repositories>
34-
...
34+
3535
<dependencies>
36-
...
3736
<dependency>
3837
<groupId>com.github.stachu540</groupId>
39-
<artifactId>HiRezAPI</artifactId>
40-
<version>2.0.1</version>
38+
<!--for all games-->
39+
<artifactId>HiRezAPI-core</artifactId>
40+
<!--for paladins-->
41+
<!--<artifactId>HiRezAPI-paladins</artifactId>-->
42+
<!--for smite-->
43+
<!--<artifactId>HiRezAPI-smite</artifactId>-->
44+
<version>2.1.0</version>
4145
</dependency>
4246
</dependencies>
43-
...
4447
```
4548
#### Gradle
4649
Add to `build.gradle` build.
4750
```groovy
48-
...
4951
repositories {
50-
...
51-
maven {
52-
url "https://jitpack.io"
53-
}
52+
jcenter()
5453
}
55-
...
54+
5655
dependencies {
57-
...
58-
compile "com.github.stachu540:HiRezAPI:2.0.1"
56+
// for all games
57+
compile "com.github.stachu540:HiRezAPI-core:2.1.0"
58+
// for paladins
59+
// compile "com.github.stachu540:HiRezAPI-paladins:2.1.0"
60+
// for smite
61+
// compile "com.github.stachu540:HiRezAPI-smite:2.1.0"
5962
}
60-
...
6163
```
6264

6365
For starting using script check [Wiki page](https://github.com/stachu540/HiRezAPI/wiki/Example-Usage).

build.gradle

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
plugins {
2+
id "idea"
3+
id "maven"
4+
id "jacoco"
5+
id "maven-publish"
6+
id "net.ltgt.apt" version "0.15"
7+
id "com.jfrog.bintray" version "1.8.0"
8+
}
9+
10+
ext {
11+
versions = [
12+
lombok : "1.16.20",
13+
slf4j : "1.7.25",
14+
logback : "1.2.3",
15+
jackson : "2.9.5",
16+
rome : "1.9.0",
17+
commons_lang3 : "3.7",
18+
okhttp : "3.10.0",
19+
jsoup : "1.11.3",
20+
codacy : "4.0.0",
21+
mockito : "2.18.3",
22+
junit : "4.12"
23+
]
24+
}
25+
26+
allprojects {
27+
group = 'com.github.stachu540'
28+
version = '2.1.0-SNAPSHOT'
29+
30+
repositories {
31+
jcenter()
32+
}
33+
34+
plugins.withType(JavaPlugin) {
35+
plugins.withId("net.ltgt.apt-idea") {
36+
afterEvaluate {
37+
project.idea.module.apt.addAptDependencies = false
38+
}
39+
}
40+
}
41+
42+
}
43+
44+
subprojects {
45+
apply plugin: "java"
46+
apply plugin: "jacoco"
47+
apply plugin: "net.ltgt.apt"
48+
apply plugin: "maven-publish"
49+
apply plugin: "com.jfrog.bintray"
50+
51+
sourceCompatibility = 1.8
52+
targetCompatibility = 1.8
53+
54+
ext.subprojectName = (project.name == "HiRezApi") ? "HiRezApi" : "HiRezApi-${project.name}"
55+
56+
sourceSets {
57+
main {
58+
java {
59+
srcDirs = ['build/generated/source/apt/main', 'src/main/java']
60+
}
61+
}
62+
}
63+
64+
dependencies {
65+
compile "org.slf4j:slf4j-api:${versions.slf4j}"
66+
annotationProcessor "org.projectlombok:lombok:${versions.lombok}"
67+
compileOnly "org.projectlombok:lombok:${versions.lombok}"
68+
69+
testCompile "junit:junit:${versions.junit}"
70+
testCompile "org.mockito:mockito-core:${versions.mockito}"
71+
testCompile "ch.qos.logback:logback-classic:${versions.logback}"
72+
}
73+
74+
// custom tasks for creating source/javadoc jars
75+
task sourcesJar(type: Jar, dependsOn: classes) {
76+
classifier = 'sources'
77+
baseName = 'HiRezApi-' + baseName
78+
from sourceSets.main.allSource
79+
}
80+
81+
task javadocJar(type: Jar, dependsOn: javadoc) {
82+
classifier = 'javadoc'
83+
baseName = 'HiRezApi-' + baseName
84+
from javadoc.destinationDir
85+
}
86+
87+
artifacts {
88+
archives javadocJar
89+
archives sourcesJar
90+
}
91+
92+
publishing {
93+
publications {
94+
mainProject(MavenPublication) {
95+
from project.components.java
96+
groupId group
97+
artifactId subprojectName
98+
version version
99+
artifact sourcesJar
100+
artifact javadocJar
101+
}
102+
}
103+
}
104+
105+
bintray {
106+
user = System.getenv('BINTRAY_USER')
107+
key = System.getenv('BINTRAY_API_KEY')
108+
publications = ['mainProject']
109+
pkg {
110+
repo = 'Java'
111+
name = 'HiRezAPI'
112+
userOrg = user
113+
desc = 'Java-Based API Wrapper for Hi-Rez Studios games.'
114+
websiteUrl = 'https://github.com/stachu540/HiRezAPI'
115+
vcsUrl = 'https://github.com/stachu540/HiRezAPI.git'
116+
issueTrackerUrl = 'https://github.com/stachu540/HiRezAPI/issues'
117+
licenses = ['MIT']
118+
labels = ['hi-rez', 'api-wrapper', 'smite', 'paladins']
119+
publicDownloadNumbers = true
120+
version {
121+
name = project.version
122+
}
123+
}
124+
}
125+
}
126+
127+
wrapper {
128+
gradleVersion = "4.7"
129+
distributionType = Wrapper.DistributionType.ALL
130+
}

checkstyle.xml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
<module name="OuterTypeFilename"/>
3232
<module name="IllegalTokenText">
3333
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
34-
<property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
35-
<property name="message" value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
34+
<property name="format"
35+
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
36+
<property name="message"
37+
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
3638
</module>
3739
<module name="AvoidEscapedUnicodeCharacters">
3840
<property name="allowEscapesForControlCharacters" value="true"/>
@@ -48,18 +50,23 @@
4850
<module name="NoLineWrap"/>
4951
<module name="EmptyBlock">
5052
<property name="option" value="TEXT"/>
51-
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
53+
<property name="tokens"
54+
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
5255
</module>
5356
<module name="NeedBraces"/>
5457
<module name="LeftCurly"/>
5558
<module name="RightCurly">
5659
<property name="id" value="RightCurlySame"/>
57-
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
60+
<property name="tokens"
61+
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
62+
LITERAL_DO"/>
5863
</module>
5964
<module name="RightCurly">
6065
<property name="id" value="RightCurlyAlone"/>
6166
<property name="option" value="alone"/>
62-
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
67+
<property name="tokens"
68+
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
69+
INSTANCE_INIT"/>
6370
</module>
6471
<module name="WhitespaceAround">
6572
<property name="allowEmptyConstructors" value="true"/>
@@ -185,17 +192,21 @@
185192
</module>
186193
<module name="MethodParamPad"/>
187194
<module name="NoWhitespaceBefore">
188-
<property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
195+
<property name="tokens"
196+
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
189197
<property name="allowLineBreaks" value="true"/>
190198
</module>
191199
<module name="ParenPad"/>
192200
<module name="OperatorWrap">
193201
<property name="option" value="NL"/>
194-
<property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
202+
<property name="tokens"
203+
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
204+
LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
195205
</module>
196206
<module name="AnnotationLocation">
197207
<property name="id" value="AnnotationLocationMostCases"/>
198-
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
208+
<property name="tokens"
209+
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
199210
</module>
200211
<module name="AnnotationLocation">
201212
<property name="id" value="AnnotationLocationVariables"/>
@@ -205,12 +216,14 @@
205216
<module name="NonEmptyAtclauseDescription"/>
206217
<module name="JavadocTagContinuationIndentation"/>
207218
<module name="SummaryJavadoc">
208-
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
219+
<property name="forbiddenSummaryFragments"
220+
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
209221
</module>
210222
<module name="JavadocParagraph"/>
211223
<module name="AtclauseOrder">
212224
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
213-
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
225+
<property name="target"
226+
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
214227
</module>
215228
<module name="JavadocMethod">
216229
<property name="scope" value="public"/>
@@ -234,4 +247,4 @@
234247
</module>
235248
<module name="CommentsIndentation"/>
236249
</module>
237-
</module>
250+
</module>

common/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dependencies {
2+
compile "com.squareup.okhttp3:okhttp:${versions.okhttp}"
3+
compile "com.squareup.okhttp3:logging-interceptor:${versions.okhttp}"
4+
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
5+
compile "org.jsoup:jsoup:${versions.jsoup}"
6+
compile "org.apache.commons:commons-lang3:${versions.commons_lang3}"
7+
compile "com.rometools:rome:${versions.rome}"
8+
}

0 commit comments

Comments
 (0)