<commit_before>#Java library slush generator

[![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://www.opensource.org/licenses/MIT)
[![NPM version](http://img.shields.io/npm/v/slush-lib-java.svg?style=flat)](http://badge.fury.io/js/slush-lib-java)
[![Downloads](http://img.shields.io/npm/dm/slush-lib-java.svg?style=flat)](https://www.npmjs.org/package/slush-lib-java)

### About

The main goal is to simplify new [github](https://github.com) java library setup. 

Features:
* [MIT](http://opensource.org/licenses/MIT) license (hardcoded)
* [Gradle](http://www.gradle.org/) build
* [Maven central](http://search.maven.org/) compatible artifacts (jar, sources, javadocs)
* Ready for [spock](https://code.google.com/p/spock/) tests ([documentation](http://spock-framework.readthedocs.org/en/latest/))
* [Bintray](https://bintray.com/) publication (may be published to maven central using bintray ui)
* [Travis-ci](https://travis-ci.org/) integration (CI and healthy badge)
* [Coveralls](http://coveralls.io/) integration (code coverage badge)
* Code quality checks (pmd, checkstyle)
* Release process (like maven release)
 
[The story behind](https://medium.com/@vyarus/faster-way-to-java-opensource-d4fa78efcf16)

### Thanks to

* [<NAME>](https://github.com/vbauer) ([android-arsenal](http://android-arsenal.com/) author) for checkstyle config
* [<NAME>](https://github.com/jroperto) for pmd config

### Setup

Install [slush](http://slushjs.github.io/):

```bash
$ npm install -g slush
```

Install `slush-lib-java` globally:

```bash
$ npm install -g slush-lib-java
```

##### Update

You can check currently installed generator version using:

```bash
slush --help
```

It will print all installed generators with versions

To update lib use:

```bash
npm update -g slush-lib-java
```

### Bintray setup

Sign up to [bintray](https://bintray.com/).
You will need to create maven repository to package artifacts to (it's name is one of generator questions).

When you publish you package (release library), you can use it directly from your custom maven repository.
Better option is to request inclusion into jcenter repository (maven central alternative).
Also, you can publish your library to maven central. Project already generates valid artifacts for maven central, but
they also must be signed. If you register certificate on bintray, it will be able to sign files for you.
Project support files signing (bintray rest api called to sign just released files).

Read [instruction](https://medium.com/@vyarus/the-hard-way-to-maven-central-c9e16d163acc)

Add bintray user and key to `~/.gradle/gradle.properties`

```
bintrayUser=username
bintrayKey=secretkey
```

### Usage

> General convention: project name == github project name == bintray package page

Create new folder for library:<commit_msg>fix doc<commit_after>#Java library slush generator

[![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://www.opensource.org/licenses/MIT)
[![NPM version](http://img.shields.io/npm/v/slush-lib-java.svg?style=flat)](http://badge.fury.io/js/slush-lib-java)
[![Downloads](http://img.shields.io/npm/dm/slush-lib-java.svg?style=flat)](https://www.npmjs.org/package/slush-lib-java)

### About

The main goal is to simplify new [github](https://github.com) java library setup. 

Features:
* [MIT](http://opensource.org/licenses/MIT) license (hardcoded)
* [Gradle](http://www.gradle.org/) build
* [Maven central](http://search.maven.org/) compatible artifacts (jar, sources, javadocs)
* Ready for [spock](https://code.google.com/p/spock/) tests ([documentation](http://spock-framework.readthedocs.org/en/latest/))
* [Bintray](https://bintray.com/) publication (may be published to maven central using bintray ui)
* [Travis-ci](https://travis-ci.org/) integration (CI and healthy badge)
* [Coveralls](http://coveralls.io/) integration (code coverage badge)
* Code quality checks (pmd, checkstyle)
* Release process (like maven release)
 
[The story behind](https://medium.com/@vyarus/faster-way-to-java-opensource-d4fa78efcf16)

### Thanks to

* [<NAME>](https://github.com/vbauer) ([android-arsenal](http://android-arsenal.com/) author) for checkstyle config
* [<NAME>](https://github.com/jroperto) for pmd config

### Setup

Install [slush](http://slushjs.github.io/):

```bash
$ npm install -g slush
```

Install `slush-lib-java` globally:

```bash
$ npm install -g slush-lib-java
```

##### Update

You can check currently installed generator version using:

```bash
$ slush --help
```

It will print all installed generators with versions

To update lib use:

```bash
$ npm update -g slush-lib-java
```

### Bintray setup

Sign up to [bintray](https://bintray.com/).
You will need to create maven repository to package artifacts to (it's name is one of generator questions).

When you publish you package (release library), you can use it directly from your custom maven repository.
Better option is to request inclusion into jcenter repository (maven central alternative).
Also, you can publish your library to maven central. Project already generates valid artifacts for maven central, but
they also must be signed. If you register certificate on bintray, it will be able to sign files for you.
Project support files signing (bintray rest api called to sign just released files).

Read [instruction](https://medium.com/@vyarus/the-hard-way-to-maven-central-c9e16d163acc)

Add bintray user and key to `~/.gradle/gradle.properties`

```
bintrayUser=username
bintrayKey=secretkey
```

### Usage

> General convention: project name == github project name == bintray package page

Create new folder for library:
{'fraction_non_alphanumeric': 0.14548022598870056, 'fraction_numerical': 0.003884180790960452, 'mean_word_length': 4.84020618556701, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 20, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7162226', 'n_tokens_mistral': 1900, 'n_tokens_neox': 1759, 'n_words': 522}