Skip to content

Commit

Permalink
Merge pull request #48 from stachu540/feature/2.1
Browse files Browse the repository at this point in the history
Merge 2.1
  • Loading branch information
Damian Staszewski authored May 7, 2018
2 parents c1ada39 + bf05537 commit a448974
Show file tree
Hide file tree
Showing 116 changed files with 2,694 additions and 1,691 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUES_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ possible. Thank you!
-->
### Versioning
**Version**: <!-- Package version -->

**OS Platform**: <!-- Operating system version with platform (x86 or x64) -->

**Java Version ( >= 1.8 )**: <!-- Recommending using Java 8, Specify Java Build version -->

### Description

<!-- Describe exactly your problem. For codes or console logs use tripple backquote (`)
For example:
```java
package pl.stachuofficial.examples
package com.examples
public class ExampleTest {
public static void main(String[] args){
System.out.println("This is a example compiled text.")
Expand Down
5 changes: 4 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
**IDE:**

**OS Platform:**

**Java Version:**
**Maven Version:**

**Gradle Version:**

### Screenshots (optional):
27 changes: 5 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
# Created by .ignore support plugin (hsz.mobi)
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties

# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
!/.mvn/wrapper/maven-wrapper.jar

!.github/

### JetBrains
.idea/**
.idea
*.iml

src/test/java/com/github/stachu540/hirezapi/*.java
!src/test/java/com/github/stachu540/hirezapi/HiRezAPITest.java
out/
.gradle
build/
logs/
22 changes: 14 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ language: java
jdk:
- oraclejdk8

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- ~/.m2/repository
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

install:
- mvn install -Dmaven.javadoc.skip=true -P !build-extras -B
- mvn dependency:go-offline -Dmaven.javadoc.skip=true -P !build-extras -B
before_install:
- chmod +x ./gradlew
script:
- mvn test -DskipTest=false -Dmaven.javadoc.skip=true -P !build-extras -B
- mvn cobertura:cobertura -Dmaven.javadoc.skip=true -P !build-extras -B
after_success:
- mvn codacy:coverage -Dmaven.javadoc.skip=true -P !build-extras -B
- ./gradlew test

deploy:
- provider: script
script: ./gradlew bintrayUpload
on:
tags: true
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[![Build Status](https://travis-ci.org/stachu540/HiRezAPI.svg)](https://travis-ci.org/stachu540/HiRezAPI)
[![Libraries.io](https://img.shields.io/librariesio/github/stachu540/HiRezAPI.svg)](https://libraries.io/github/stachu540/HiRezAPI)
[![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)
[![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)
[![Javadocs](https://img.shields.io/badge/Javadoc-v2.0.1-brightgreen.svg)](https://jitpack.io/com/github/stachu540/HiRezAPI/v2.0.1/javadoc/)
[![Release](https://jitpack.io/v/stachu540/HiRezAPI.svg)](https://jitpack.io/#stachu540/HiRezAPI)

# HiRezAPI

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

## Features

Expand All @@ -28,37 +27,39 @@ Add to `pom.xml` build.
<repositories>
...
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
<id>jcenter</id>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
...

<dependencies>
...
<dependency>
<groupId>com.github.stachu540</groupId>
<artifactId>HiRezAPI</artifactId>
<version>2.0.1</version>
<!--for all games-->
<artifactId>HiRezAPI-core</artifactId>
<!--for paladins-->
<!--<artifactId>HiRezAPI-paladins</artifactId>-->
<!--for smite-->
<!--<artifactId>HiRezAPI-smite</artifactId>-->
<version>2.1.0</version>
</dependency>
</dependencies>
...
```
#### Gradle
Add to `build.gradle` build.
```groovy
...
repositories {
...
maven {
url "https://jitpack.io"
}
jcenter()
}
...
dependencies {
...
compile "com.github.stachu540:HiRezAPI:2.0.1"
// for all games
compile "com.github.stachu540:HiRezAPI-core:2.1.0"
// for paladins
// compile "com.github.stachu540:HiRezAPI-paladins:2.1.0"
// for smite
// compile "com.github.stachu540:HiRezAPI-smite:2.1.0"
}
...
```

For starting using script check [Wiki page](https://github.com/stachu540/HiRezAPI/wiki/Example-Usage).
Expand Down
130 changes: 130 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
plugins {
id "idea"
id "maven"
id "jacoco"
id "maven-publish"
id "net.ltgt.apt" version "0.15"
id "com.jfrog.bintray" version "1.8.0"
}

ext {
versions = [
lombok : "1.16.20",
slf4j : "1.7.25",
logback : "1.2.3",
jackson : "2.9.5",
rome : "1.9.0",
commons_lang3 : "3.7",
okhttp : "3.10.0",
jsoup : "1.11.3",
codacy : "4.0.0",
mockito : "2.18.3",
junit : "4.12"
]
}

allprojects {
group = 'com.github.stachu540'
version = '2.1.0-SNAPSHOT'

repositories {
jcenter()
}

plugins.withType(JavaPlugin) {
plugins.withId("net.ltgt.apt-idea") {
afterEvaluate {
project.idea.module.apt.addAptDependencies = false
}
}
}

}

subprojects {
apply plugin: "java"
apply plugin: "jacoco"
apply plugin: "net.ltgt.apt"
apply plugin: "maven-publish"
apply plugin: "com.jfrog.bintray"

sourceCompatibility = 1.8
targetCompatibility = 1.8

ext.subprojectName = (project.name == "HiRezApi") ? "HiRezApi" : "HiRezApi-${project.name}"

sourceSets {
main {
java {
srcDirs = ['build/generated/source/apt/main', 'src/main/java']
}
}
}

dependencies {
compile "org.slf4j:slf4j-api:${versions.slf4j}"
annotationProcessor "org.projectlombok:lombok:${versions.lombok}"
compileOnly "org.projectlombok:lombok:${versions.lombok}"

testCompile "junit:junit:${versions.junit}"
testCompile "org.mockito:mockito-core:${versions.mockito}"
testCompile "ch.qos.logback:logback-classic:${versions.logback}"
}

// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
baseName = 'HiRezApi-' + baseName
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
baseName = 'HiRezApi-' + baseName
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

publishing {
publications {
mainProject(MavenPublication) {
from project.components.java
groupId group
artifactId subprojectName
version version
artifact sourcesJar
artifact javadocJar
}
}
}

bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['mainProject']
pkg {
repo = 'Java'
name = 'HiRezAPI'
userOrg = user
desc = 'Java-Based API Wrapper for Hi-Rez Studios games.'
websiteUrl = 'https://github.com/stachu540/HiRezAPI'
vcsUrl = 'https://github.com/stachu540/HiRezAPI.git'
issueTrackerUrl = 'https://github.com/stachu540/HiRezAPI/issues'
licenses = ['MIT']
labels = ['hi-rez', 'api-wrapper', 'smite', 'paladins']
publicDownloadNumbers = true
version {
name = project.version
}
}
}
}

wrapper {
gradleVersion = "4.7"
distributionType = Wrapper.DistributionType.ALL
}
25 changes: 16 additions & 9 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->

<module name="Checker">
<module name = "Checker">
<property name="charset" value="UTF-8"/>

<property name="severity" value="warning"/>
Expand Down Expand Up @@ -50,20 +50,23 @@
<module name="NoLineWrap"/>
<module name="EmptyBlock">
<property name="option" value="TEXT"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
<module name="LeftCurly"/>
<module name="RightCurly">
<property name="id" value="RightCurlySame"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
LITERAL_DO"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlyAlone"/>
<property name="option" value="alone"/>
<property name="tokens"
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
INSTANCE_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
Expand Down Expand Up @@ -189,18 +192,21 @@
</module>
<module name="MethodParamPad"/>
<module name="NoWhitespaceBefore">
<property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
<property name="tokens"
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
<property name="allowLineBreaks" value="true"/>
</module>
<module name="ParenPad"/>
<module name="OperatorWrap">
<property name="option" value="NL"/>
<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 "/>
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 "/>
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationMostCases"/>
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
<property name="tokens"
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationVariables"/>
Expand All @@ -216,7 +222,8 @@
<module name="JavadocParagraph"/>
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
<property name="target"
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
Expand All @@ -240,4 +247,4 @@
</module>
<module name="CommentsIndentation"/>
</module>
</module>
</module>
8 changes: 8 additions & 0 deletions common/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dependencies {
compile "com.squareup.okhttp3:okhttp:${versions.okhttp}"
compile "com.squareup.okhttp3:logging-interceptor:${versions.okhttp}"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
compile "org.jsoup:jsoup:${versions.jsoup}"
compile "org.apache.commons:commons-lang3:${versions.commons_lang3}"
compile "com.rometools:rome:${versions.rome}"
}
Loading

0 comments on commit a448974

Please sign in to comment.