Skip to content

Commit

Permalink
Merge pull request #49 from twitch4j/develop
Browse files Browse the repository at this point in the history
release(v0.11.0): Prepare Release v0.11.0
  • Loading branch information
PhilippHeuer committed Jul 15, 2018
2 parents 9bc0da7 + 96f1780 commit 0b0353b
Show file tree
Hide file tree
Showing 162 changed files with 2,881 additions and 2,607 deletions.
162 changes: 144 additions & 18 deletions .github/CONTRIBUTING.md
@@ -1,24 +1,150 @@
# Contributing to Twitch4J
Thanks for considering to help out on his project.
Thank you for considering to help us on this project. This guidelines presents:
* **[How to configure your IDE](#how-to-configure-your-ide)**
* **[How to contribute to Twitch4J](#how-to-contribute-to-twitch4j)**

## Issues
If there is a problem with a feature please tell me, just please make sure to follow the [template](ISSUE_TEMPLATE.md)
in order to allow me to more easily identify the issue and fix it. Questions and suggestions are also welcome to be
posted as an issue, however I'd rather talk about it in a better medium than Github issues so I would prefer if you talk
to me about it on [Discord](https://discord.gg/FQ5vgW3).
## How to configure your IDE
Configuring IDE is important to starting contribute. We do like preferred use [IntelliJ IDEA](https://www.jetbrains.com/idea/).
Considering other IDE is possible if:
* Have annotation processor support like plugins, extension etc.
* Supporting Gradle project
* Having installed Git (optional supported as plugin or extension)
* Supporting Java Development Kit 8 and late

## Pull Requests
So, you are thinking about sending a pull request, awesome! Before starting on your pull request, you should read up on
the [pull request template](PULL_REQUEST_TEMPLATE.md).
### Prepare your IDE
Before start we need a [Java Development Kit 8 (JDK8)](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). Install it and configure environmental variables: `JAVA_HOME` if not exist, create and adding to `PATH` - `$JAVA_HOME/bin`.
#### IntelliJ IDEA
[Jetbrains](https://www.jetbrains.com/) provides a most popular IDE for JVM referenced programming language.
It is a great choice to starting journey with this IDE. That's why we recommending it for people who's like programming in Java.

Just a few things to note when submitting a pull request:
Before starting configuration this IDE we need [download IDE](https://www.jetbrains.com/idea/download/) and [Lombok plugin](https://plugins.jetbrains.com/plugin/6317-lombok-plugin) (you can install it from the **Settings** menu)
* Import project using link for git project.

Go to **File** > **New** > **Project from Version Control** > **Git**
Paste your link in **URL** field and press **Clone** to start cloning repository.

1. All your code will be subject to the project's licence, in this case [MIT](https://github.com/PhilippHeuer/twitch4j/blob/master/LICENSE).
2. You cannot modify this project's style (i.e. indentation style, bracket style, naming, etc).
Rewrites of certain systems are fine too.
3. Create your pull-request against the `develop` branch!
* In *bottom-right corner* will shows pop-out which inform the Gradle project has been founded and ready to link. Click **Import Gradle Project**.

### Style Requirements
* This project uses [1tbs](https://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS), with the exception that single
If you lost this pop-out you can find them in **Event Log** (default: *bottom-right tab*)

* Then will shows a window **Import Module from Gradle**.
* Uncheck **Create separate module per source set** - this one makes issue in annotation processing.
* Select **Use gradle 'wrapper' task configuration** - cause we provide gradle wrapper for this repository. We not recommend using a different gradle version cause about tasks works with bundled wrapper.
* Set **Gradle JVM** if module couldn't found `JAVA_HOME` variable we should add it manually using three dots (`...`) button.
* Press **OK** and wait till IDE finished importing dependencies

* Next step is install [Lombok Plugin](https://plugins.jetbrains.com/plugin/6317-lombok-plugin).

Go to **File** > **Settings** and **Plugins** tab. Click **Browse repositories...** button. Use search bar typing `Lombok Plugin`. Install it and restart IDE.

* Final step is **Annotation Processors**

Project will not import all configurations to the IDE. We should do manually.
Same way like the Lombok (**File** > **Settings**) but we going to **Build, Execution, Deployment** > **Compiler** > **Annotation Processors**.
* Check **Enable annotation processing**
* Select **Module content root**
* Change sources directory to:
* **Production sources directory**: `build\generated\source\apt\main`
* **Test sources directory**: `build\generated\source\apt\test`
* Press **OK**

#### Eclipse
[Eclipse](https://www.eclipse.org) is another choice for advancements programming and old known IDE before IntelliJ.
Before starting configuration this IDE we need [download IDE](https://www.eclipse.org/downloads/) and install [Lombok](https://projectlombok.org/) using [this installer](https://projectlombok.org/download).

* After [installation Eclipse](https://wiki.eclipse.org/Eclipse/Installation), try install a [Project Lombok](https://projectlombok.org/) using a [installer](https://projectlombok.org/download)

Follow the instructions on the screen. Add JVM args into `eclipse.ini` (this file is in installed source directory) file if you have possibilities. If it is exist you can proceed to next step, when it is a importing our project.
Sometimes it is not necessarily because Lombok installer adding them into the `eclipse.ini` file. It's up to you.
```
-vmargs -javaagent:lombok.jar
```

* Import project using link for git project.

For this step we needed make sure if we have booth extensions required for working of this project.
- [EGit - Git Integration for Eclipse](https://marketplace.eclipse.org/content/egit-git-integration-eclipse)
- [Buildship Gradle Integration](https://marketplace.eclipse.org/content/buildship-gradle-integration)

If IDE have it implemented in installation we can proceed to the steps below:

- Go to **File** > **Import** and select > **Git** > **Projects from Git**.
- Press **Next >** and select **Clone URI** with pressing **Next >**.
- Paste your link in **URI** field and press **Next >**.
- Select specific branches what you need to work with them and press **Next >**.
- To start cloning repository specify **Directory**, **Initial branch** (recommending select `develop` branch) and **Remote name**. I think you need change only directory because of rest is find and we will leave this.
- Final step is select **Import as general project**. If we trying use **Import using the New Project wizard**, Gradle extension will not allow us to import, only creation.
- That's all of them. Import as new **general** project and press **Finish** to start.
- On the *right side* ide you will find a distinctive a Gradle elephant logo. Click him to expand **Gradle Task View** tab. You will find this message `There are no Gradl;e projects in the current workspace. Import a Gradle project to see its tasks in the Gradle Task View`. Click to **Import a Gradle Project**
- Specify a **Project root directory** if this field is empty. Sometimes we need specify a Working sets. Create them one using **New** button, and choose **Resource**. Before finishing and selecting our project we must naming a **Working set name**. Than click **Finish**.

* Final step is activate **Annotation Processing**

- Right click on the project and select Properties.
- Open **Java Compiler** > **Annotation Processing**. Check **Enable annotation processing**.
- Change sources directory to:
* **Generated source directory**: `build\generated\source\apt\main`
* **Generated test source directory**: `build\generated\source\apt\test`
- Confirm changes pressing **Apply and Close**

#### Netbeans
[NetBeans](https://www.eclipse.org) IDE is a free and open source integrated development environment for application development on Windows, Mac, Linux, and Solaris operating systems. The IDE simplifies the development of web, enterprise, desktop, and mobile applications that use the Java and HTML5 platforms. The IDE also offers support for the development of PHP and C/C++ applications. Project is associate by Oracle Corporation.

To get started we need first a [Gradle Support](http://plugins.netbeans.org/plugin/44510/gradle-support) plugin and Downloaded [Project Lombok](https://projectlombok.org/download) jar package.

* Before start install [Gradle Support](http://plugins.netbeans.org/plugin/44510/gradle-support) plugin first.

You can use in menu **Tools** > **Plugins**. In **Available Plugins** tab type `Gradle Support` in search field. Mark them and click **Install**. Shows Installer window, accept a licensing conditions to continue installations.

* Now it's time to import our project.

- Go to **Team** > **Git** > **Clone**
- Paste your link into **Repository URL** field and press **Next >**. Of course before that you can specified Destination Folder for cloning our project.
- Choose branches for listening. If you want it. Very important!!! You need listen a `develop` branch because we are pushing there before pushing into `master` branch and create Release.
- In next step select **Checkout Branch** to `develop`, and click **Finish**
- After cloned project will show information alert when asking us when we want open this project. We will do pressing **Open Project**

Now IDE will automatically finds a Gradle project and will execute tasks for preparing project to start coding. No configuration of Annotation processing, no more adding Lombok plugins stuffs like. Everything is on the Gradle Plugin.

## How to contribute to Twitch4J
Of course you can contribute to our repository in 3 ways:
* Creating Issue
* Joining to our [Discord Server](https://discord.gg/FQ5vgW3)
* Create Pull Request

### Issue
All your ideas, features, bug reports, etc. must be documented in following comments on [issue](https://github.com/twitch4j/twitch4j/issues/new) tab.
Questions in issue are not welcome. Use Discord server below to asking developers for your question.

### Discord Server
Your problem is a hardest to reproduce? Having a questions, how to and where? Come, join to our [Discord Server](https://discord.gg/FQ5vgW3)

### Pull Requests
So, you are thinking about sending a pull request? Awesome! But... before starting on your pull request, you should read up on
the [pull request](https://github.com/twitch4j/twitch4j/compare) comment.

Before starting pull request make sure if:

1. All your code will be subject to the project's licence, in this case [MIT](https://github.com/twitch4j/twitch4j/blob/master/LICENSE).
2. Your code follows a style requirements mentioned below, and you didn't modified project style (ex. indentation style, bracket style, naming, comments, etc).
Rewrites of certain systems are kindly welcome too.
3. *Your pull-request must be created **ONLY** against the `develop` branch!*

#### Style Requirements
* This project uses [1tbs](https://en.wikipedia.org/wiki/Indentation_style#1TBS), with the exception that single
line if statements do not need brackets.
* All instanced objects should have getters and setters (where reasonable)
* All instanced objects should have **getters** and **setters** using [Project Lombok](https://projectlombok.org/) (where reasonable)
* All object instances, methods and fields must be documented for getting sure what does things are doing.
* Documented notes (backslashes `//` or slashed stars `/* */`) is optional into inside methods for getting sure what does things are doing.
* If some parts of code is unofficial and they are using non-documented part of [Twitch API](https://dev.twitch.tv/docs), mark them using `@Unofficial("<link to source>")` annotation adding inside the source
* Documenting object instances (classes, interfaces, enums) must have a same format below:
```java
/**
* {Your short description}
* <p>
* {Your longest description}
* @author {Full name or Username} [{Github link or e-mail address}]
* @version %I%, %G%
* @since {next minor version (eg. 0.11.0)}
*/
public class Example {}
```
24 changes: 0 additions & 24 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

17 changes: 15 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,15 +1,28 @@
<!--
Thanks to using Twitch4J
Before you submit pull request read Contributing guidelines.
We do not anwser the questions. If you have ask, go to https://discord.gg/FQ5vgW3
Issue is not a place for questions and spam.
-->
### Prerequisites
* [ ] I have read and understood the [contribution guidelines](CONTRIBUTING.md)
* [ ] I have read and understood the [contribution guidelines](https://github.com/twitch4j/twitch4j/blob/master/.github/CONTRIBUTING.md) and I accept them.
* [ ] This pull request follows the code style of the project
* [ ] I have tested this feature

### Issues Fixed [Just remove this, if there is no relation to any issues]
...
<!-- Uncommend and remove this message, if there is relation to any issues.
### Issues Fixed
* [Issue #1]
...
-->

### Changes Proposed

* [Change 1]
* [Change 2]

...

### Additional Information
<!-- Any other information that may be able to help me with the problem. Remove them it is not necercarly. -->
28 changes: 28 additions & 0 deletions .github/bug_report.md
@@ -0,0 +1,28 @@
<!--
Thanks to using Twitch4J
Before you submit pull request/issue read Contributing guidelines.
We do not anwser the questions. If you have ask, go to https://discord.gg/FQ5vgW3
Issue is not a place for questions and spam.
-->
### Prerequisites
* [ ] If this is a question/suggestion, I have already considered discuss it on [Discord Server](https://discord.gg/FQ5vgW3)
* [ ] This issue specifically has something to do with Twitch4J
* [ ] I have attempted to [look for similar issues](https://github.com/twitch4j/twitch4j/issues) already
* [ ] I have read and understood the [contribution guidelines](https://github.com/twitch4j/twitch4j/blob/master/.github/CONTRIBUTING.md) and I accept them.

<!-- Without marking last checkbox, your issue will be declined -->

### Description
<!-- Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

### Solutions
<!-- Describe the solution you'd like
A clear and concise description of what you want to happen. -->

### Alternatives
<!-- Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered. -->

### Additional context
<!-- Add any other context or screenshots about the feature request here. -->
46 changes: 46 additions & 0 deletions .github/feature_request.md
@@ -0,0 +1,46 @@
<!--
Thanks to using Twitch4J
Before you submit pull request/issue read Contributing guidelines.
We do not anwser the questions. If you have ask, go to https://discord.gg/FQ5vgW3
Issue is not a place for questions and spam.
-->

### Prerequisites
* [ ] If this is a question/suggestion, I have already considered discuss it on [Discord Server](https://discord.gg/FQ5vgW3)
* [ ] This issue specifically has something to do with Twitch4J
* [ ] I have attempted to [look for similar issues](https://github.com/twitch4j/twitch4j/issues) already
* [ ] I have read and understood the [contribution guidelines](https://github.com/twitch4j/twitch4j/blob/master/.github/CONTRIBUTING.md) and I accept them.

<!-- Without marking last checkbox, your issue will be declined -->

### Description
<!--
Here is your description. Providing much more information helps out fixing
or reproduce your problemas fast as possible.
For providing codes or stacktraces, consider adding them using a tripple backquotes '```' between.
It will be better readable for us.
-->

### Steps to Reproduce
<!--
Your reproduction steps. What you need to reproduce. Step by step explain it.
ex.
1. [First step]
2. [Second step]
-->

...

**Expected behavior:**
<!-- What was supposed to happen -->
**Actual behavior:**
<!-- What actually happened -->
**Stacktrace (if applicable):**
<!-- link to the stacktrace or block code using tipple backquotes -->
**Version affected:**
<!-- The version/commit you are using -->

### Additional Information
<!-- Any other information that may be able to help me with the problem. Remove them it is not necercarly. -->
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -51,7 +51,7 @@ client.log
/docs/javadoc/*

# Example Code
/src/main/java/me/philippheuer/twitch4j/example/*
src/*/java/twitch4j/example/*

# Modules
/modules/
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -14,7 +14,6 @@ cache:
# Before Install
before_install:
- chmod +x gradlew
- ./gradlew install

# Build
script:
Expand All @@ -25,4 +24,4 @@ deploy:
- provider: script
script: ./gradlew bintrayUpload
on:
condition: $TRAVIS_BRANCH == "master" || -n $TRAVIS_TAG
tags: true
12 changes: 4 additions & 8 deletions README.md
Expand Up @@ -2,8 +2,6 @@

<p align="center">
<a href="https://travis-ci.org/twitch4j/twitch4j"><img src="https://travis-ci.org/twitch4j/twitch4j.svg?branch=master" alt="Build Status"></a>
<img src="https://img.shields.io/librariesio/github/twitch4j/twitch4j.svg?style=flat-square" alt="Libraries.io for GitHub">
<a href="https://www.codacy.com/app/twitch4j/twitch4j?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=twitch4j/twitch4j&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/4d9f9562de194b7f8699f9adfd0c4669" alt="Codacy Badge"></a>
<a href="http://isitmaintained.com/project/twitch4j/twitch4j"><img src="http://isitmaintained.com/badge/resolution/twitch4j/twitch4j.svg" alt="Average time to resolve an issue"></a>
<a href="http://isitmaintained.com/project/twitch4j/twitch4j"><img src="http://isitmaintained.com/badge/open/twitch4j/twitch4j.svg" alt="Percentage of issues still open"></a>
<a href="https://bintray.com/twitch4j/maven/Twitch4J/_latestVersion"><img src="https://api.bintray.com/packages/twitch4j/maven/Twitch4J/images/download.svg" alt="Download"></a>
Expand All @@ -19,8 +17,7 @@ Support:

Documentation:

[![JavaDoc: Master](https://img.shields.io/badge/JavaDoc-Master-006400.svg?style=flat-square)](https://jitpack.io/com/github/PhilippHeuer/twitch4j/master-SNAPSHOT/javadoc/index.html)
[![JavaDoc: Develop](https://img.shields.io/badge/JavaDoc-Develop-006400.svg?style=flat-square)](https://jitpack.io/com/github/PhilippHeuer/twitch4j/develop-SNAPSHOT/javadoc/index.html)
[![Javadocs](http://javadoc.io/badge/com.github.twitch4j/twitch4j.svg)](http://javadoc.io/doc/com.github.twitch4j/twitch4j)
[![Wiki](https://img.shields.io/badge/Wiki-Github-D3D3D3.svg?style=flat-square)](https://github.com/PhilippHeuer/twitch4j/wiki)

--------
Expand All @@ -29,7 +26,6 @@ Documentation:
This API aims to retrieve all twitch relation information from the Twitch REST API V5, Twitch PubSub and the Twitch IRC Server. Futhermore twitch related services like Streamlabs are integrated.

This project is still in development, check out [Features](#features) and [Changelog](#changelog) to follow progress.

## Quick Start

#### Gradle
Expand All @@ -43,7 +39,7 @@ and: (latest, you should use the actual version here)

```groovy
dependencies {
compile 'com.github.twitch4j:twitch4j:+'
compile 'com.github.twitch4j:twitch4j:v0.11.0'
}
```

Expand All @@ -63,7 +59,7 @@ and: (latest, you should use the actual version here)
<dependency>
<groupId>com.github.twitch4j</groupId>
<artifactId>twitch4j</artifactId>
<version>v0.10.0</version>
<version>v0.11.0</version>
</dependency>
```

Expand All @@ -76,7 +72,7 @@ and: (latest, you should use the actual version here)

#### Twitch REST Endpoints
- [ ] Bits
- [ ] Channel Feed
- [x] ~~Channel Feed~~ [#50](https://github.com/twitch4j/twitch4j/issues/50)
- [x] Channels
- [ ] Chat
- [ ] Clips
Expand Down

0 comments on commit 0b0353b

Please sign in to comment.