Skip to content

Commit a448974

Browse files
author
Damian Staszewski
authored
Merge pull request #48 from stachu540/feature/2.1
Merge 2.1
2 parents c1ada39 + bf05537 commit a448974

File tree

116 files changed

+2694
-1691
lines changed

Some content is hidden

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

116 files changed

+2694
-1691
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: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
[![Build Status](https://travis-ci.org/stachu540/HiRezAPI.svg)](https://travis-ci.org/stachu540/HiRezAPI)
22
[![Libraries.io](https://img.shields.io/librariesio/github/stachu540/HiRezAPI.svg)](https://libraries.io/github/stachu540/HiRezAPI)
33
[![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)
4-
[![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)
54
[![Javadocs](https://img.shields.io/badge/Javadoc-v2.0.1-brightgreen.svg)](https://jitpack.io/com/github/stachu540/HiRezAPI/v2.0.1/javadoc/)
65
[![Release](https://jitpack.io/v/stachu540/HiRezAPI.svg)](https://jitpack.io/#stachu540/HiRezAPI)
76

87
# HiRezAPI
98

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

1413
## Features
1514

@@ -28,37 +27,39 @@ Add to `pom.xml` build.
2827
<repositories>
2928
...
3029
<repository>
31-
<id>jitpack.io</id>
32-
<url>https://jitpack.io</url>
30+
<id>jcenter</id>
31+
<url>https://jcenter.bintray.com</url>
3332
</repository>
3433
</repositories>
35-
...
34+
3635
<dependencies>
37-
...
3836
<dependency>
3937
<groupId>com.github.stachu540</groupId>
40-
<artifactId>HiRezAPI</artifactId>
41-
<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>
4245
</dependency>
4346
</dependencies>
44-
...
4547
```
4648
#### Gradle
4749
Add to `build.gradle` build.
4850
```groovy
49-
...
5051
repositories {
51-
...
52-
maven {
53-
url "https://jitpack.io"
54-
}
52+
jcenter()
5553
}
56-
...
54+
5755
dependencies {
58-
...
59-
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"
6062
}
61-
...
6263
```
6364

6465
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: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
1616
-->
1717

18-
<module name="Checker">
18+
<module name = "Checker">
1919
<property name="charset" value="UTF-8"/>
2020

2121
<property name="severity" value="warning"/>
@@ -50,20 +50,23 @@
5050
<module name="NoLineWrap"/>
5151
<module name="EmptyBlock">
5252
<property name="option" value="TEXT"/>
53-
<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"/>
5455
</module>
5556
<module name="NeedBraces"/>
5657
<module name="LeftCurly"/>
5758
<module name="RightCurly">
5859
<property name="id" value="RightCurlySame"/>
5960
<property name="tokens"
60-
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
61+
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
62+
LITERAL_DO"/>
6163
</module>
6264
<module name="RightCurly">
6365
<property name="id" value="RightCurlyAlone"/>
6466
<property name="option" value="alone"/>
6567
<property name="tokens"
66-
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
68+
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
69+
INSTANCE_INIT"/>
6770
</module>
6871
<module name="WhitespaceAround">
6972
<property name="allowEmptyConstructors" value="true"/>
@@ -189,18 +192,21 @@
189192
</module>
190193
<module name="MethodParamPad"/>
191194
<module name="NoWhitespaceBefore">
192-
<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"/>
193197
<property name="allowLineBreaks" value="true"/>
194198
</module>
195199
<module name="ParenPad"/>
196200
<module name="OperatorWrap">
197201
<property name="option" value="NL"/>
198202
<property name="tokens"
199-
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 "/>
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 "/>
200205
</module>
201206
<module name="AnnotationLocation">
202207
<property name="id" value="AnnotationLocationMostCases"/>
203-
<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"/>
204210
</module>
205211
<module name="AnnotationLocation">
206212
<property name="id" value="AnnotationLocationVariables"/>
@@ -216,7 +222,8 @@
216222
<module name="JavadocParagraph"/>
217223
<module name="AtclauseOrder">
218224
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
219-
<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"/>
220227
</module>
221228
<module name="JavadocMethod">
222229
<property name="scope" value="public"/>
@@ -240,4 +247,4 @@
240247
</module>
241248
<module name="CommentsIndentation"/>
242249
</module>
243-
</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)