Skip to content

Commit

Permalink
Update project build files, dependencies, and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lukespragg committed Jan 10, 2016
1 parent a17d954 commit de2ad0a
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 125 deletions.
42 changes: 32 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
# Use new Travis-CI infrastructure
sudo: false

# Source language and JDK version to use
language: java
jdk: oraclejdk7
jdk: oraclejdk8

# Use cached Maven dependencies
cache:
directories:
- $HOME/.m2

# Compile and package JAR and set build properties
# Pre-install Maven dependencies
install: mvn dependency:go-offline
script: mvn package -DbuildNumber=$TRAVIS_BUILD_NUMBER -DciSystem=travis -Dcommit=${TRAVIS_COMMIT:0:7}

# Perform steps after compilation/test success
# Compile and test source
script: mvn clean -DbuildNumber=$TRAVIS_BUILD_NUMBER -DciSystem=travis -Dcommit=${TRAVIS_COMMIT:0:7}

# Fetch resources, run deployment goal/task, and generate Javadocs and reports
after_success:
# Get files for use with build, namely the custom Maven settings.xml
- "git clone https://github.com/flow/travis-ci-resources.git target/travis"
# Check if commit is not a pull request, if repo is official, and branch is master, generate and deploy artifacts and reports
- "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/flow-networking ]] && [[ $TRAVIS_BRANCH == master ]] && mvn javadoc:jar source:jar cobertura:cobertura coveralls:cobertura -DserviceJobId=$TRAVIS_JOB_ID deploy --settings target/travis/settings.xml"
# Get files for use with build, namely the custom Maven settings.xml and scripts
- "git clone https://github.com/flow/travis-ci-resources.git $HOME/build/flow/travis"
# DEVELOP: Check if commit is not a pull request, if repo is official, if branch is not master; then deploy artifacts
- "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/network ]] && [[ $TRAVIS_BRANCH == develop ]] && mvn javadoc:jar source:jar deploy --settings $HOME/build/flow/travis/settings.xml"
# RELEASE: Check if commit is not a pull request, if repo is official, if branch is master; then run deployment script
- "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/network ]] && [[ $TRAVIS_BRANCH == master ]] && $HOME/build/flow/travis/deploy.sh && $HOME/build/flow/travis/gh-pages.sh"
# Generate Javadocs and report for Coveralls.io
- "mvn javadoc:javadoc cobertura:cobertura coveralls:report -DserviceJobId=$TRAVIS_JOB_ID"

# RELEASE: Deploy main JAR to GitHub Releases
deploy:
provider: releases
api-key: $GITHUB_TOKEN
file: "target/flow-network-`cat version.txt`.jar"
skip_cleanup: true
on:
branch: master

# Notification services
notifications:
Expand All @@ -27,5 +50,4 @@ env:
# Make the log output cleaner
- TERM=dumb
# Super secure, encrypted variables! Ssssh!
- secure: "W+3c+zyZvJAGxnlzn1KDwO0+sAGilX88Bkm4TFdk1a3foXtF7+kj3GFyRnxH7ga2y+gEivxWwatS3MZYpXeU2ruI91N3GlYSbQNeySUQPA8If+qjXwQQpZlDt8/R+LnlbAfaG+CovTIELb7E4obX8RXKLRGdVoh3JZVjRYh+5tM="
- secure: "fGFdb9H61pzNQbeBrQCwTr9MlmbsidGHD9disxkzZ1N95Jy4p7KiW+FFMk4/ZabjEdSfC+jSYN96KHpOdNXmPt6pDjyJlSQk8JS2hyIwI9jxGECNul8etFM6sS65Pp1Ay6LCvUnbAjnIIQY0wBgQjwveFx7xp6oUQuURi8JhNo8="

64 changes: 27 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Flow Networking [![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)][License] [![Flattr this](http://img.shields.io/badge/flattr-donate-lightgrey.svg?style=flat)][Donate] [![Build Status](http://img.shields.io/travis/flow/flow-networking/master.svg?style=flat)](https://travis-ci.org/flow/flow-networking) [![Coverage Status](http://img.shields.io/coveralls/flow/flow-networking/master.svg?style=flat)](https://coveralls.io/r/flow/flow-networking)
==================
Networking library for the Flow collection.
# Flow Network [![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)][License] [![Flattr this](http://img.shields.io/badge/flattr-donate-lightgrey.svg?style=flat)][Donate] [![Build Status](http://img.shields.io/travis/flow/network/develop.svg?style=flat)](https://travis-ci.org/flow/network) [![Coverage Status](http://img.shields.io/coveralls/flow/network/develop.svg?style=flat)](https://coveralls.io/r/flow/network)

Network library for the Flow collection.

## Getting Started
* [Examples and code snippets](https://github.com/flow/examples/tree/master/networking)
* [Examples and code snippets](https://github.com/flow/examples/tree/master/network)
* [Official documentation](#documentation)
* [IRC support chat](http://kiwiirc.com/client/irc.esper.net/flow)
* [Issues tracker](https://github.com/flow/flow-networking/issues)
* [Issues tracker](https://github.com/flow/network/issues)

## Source Code
The latest and greatest source can be found here on [GitHub](https://github.com/flow/flow-networking). If you are using Git, use this command to clone the project:
The latest and greatest source can be found here on [GitHub](https://github.com/flow/network). If you are using Git, use this command to clone the project:

git clone git://github.com/flow/flow-networking.git
git clone git://github.com/flow/network.git

Or download the [latest zip archive](https://github.com/flow/flow-networking/archive/master.zip).
Or download the latest [development archive](https://github.com/flow/network/archive/develop.zip) or the latest [stable archive](https://github.com/flow/network/archive/master.zip).

## Dependencies
We love open-source libraries! This project uses are few of them to make things easier. If you aren't using Maven or Gradle, you'll need these!
Expand All @@ -28,7 +28,7 @@ The following dependencies are only needed if you compiling the tests included w
* [org.powermock:powermock-module-junit4](https://oss.sonatype.org/#nexus-search;gav~org.powermock~powermock-module-junit4~~~)

## Building from Source
This project can be built with the _latest_ [Java Development Kit](http://oracle.com/technetwork/java/javase/downloads) and [Maven](http://maven.apache.org/) or [Gradle](http://www.gradle.org/). Maven and Gradle are used to simplify dependency management, but using either of them is optional.
This project can be built with the _latest_ [Java Development Kit](http://oracle.com/technetwork/java/javase/downloads) and [Maven](https://maven.apache.org/) or [Gradle](https://www.gradle.org/). Maven and Gradle are used to simplify dependency management, but using either of them is optional.

For Maven, the command `mvn clean package` will build the project and will put the compiled JAR in `target`, and `mvn clean install` will copy it to your local Maven repository.

Expand All @@ -43,60 +43,50 @@ Are you a talented programmer looking to contribute some code? We'd love the hel

Love the project? Feel free to [donate] to help continue development! Flow projects are open-source and powered by community members, like yourself. Without you, we wouldn't be here today!

Please don't forget to follow and star our repo! Join our growing community to keep up to date with the latest Flow development.
Don't forget to watch and star our repo to keep up-to-date with the latest Flow development!

## Usage
If you're using [Maven](http://maven.apache.org/download.html) to manage project dependencies, simply include the following in your `pom.xml` file:
If you're using [Maven](https://maven.apache.org/download.html) to manage project dependencies, simply include the following in your `pom.xml` file:

<dependency>
<groupId>com.flowpowered</groupId>
<artifactId>flow-networking</artifactId>
<artifactId>flow-network</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>

If you do not already have the required repo in your repository list, you will need to add this as well:

<repository>
<id>sonatype-nexus</id>
<url>https://oss.sonatype.org/content/groups/public</url>
</repository>

If you're using [Gradle](http://www.gradle.org/) to manage project dependencies, simply include the following in your `build.gradle` file:
If you're using [Gradle](https://www.gradle.org/) to manage project dependencies, simply include the following in your `build.gradle` file:

repositories {
mavenLocal()
mavenCentral()
maven {
name = 'sonatype-nexus'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
compile 'com.flowpowered:flow-networking:0.1.0-SNAPSHOT'
compile 'com.flowpowered:flow-network:1.0.0-SNAPSHOT'
}

If you'd prefer to manually import the latest .jar file, you can get it [here](https://github.com/flow/flow-networking/releases).
If you plan on using snapshots and do not already have the snapshot repo in your repository list, you will need to add this as well:

https://oss.sonatype.org/content/groups/public/

If you'd prefer to manually import the latest .jar file, you can get it [here](https://github.com/flow/network/releases).

## Documentation
Want to get friendly with the project and put it to good use? Check out the latest [Javadocs](http://networking.flowpowered.com/).
Want to get friendly with the project and put it to good use? Check out the latest [Javadocs](https://flowpowered.com/network).

To generate the the Javadocs with Maven, use the `mvn javadoc:javadoc` command. To view the javadocs simply go to `target/site/apidocs/` and open `index.html` in a web browser.
To generate Javadocs with Maven, use the `mvn javadoc:javadoc` command. To view the Javadocs simply go to `target/site/apidocs/` and open `index.html` in a web browser.

To generate Javadocs with Gradle, use the `gradlew javadoc` command. To view the javadocs simply go to `build/docs/javadoc/` and open `index.html` in a web browser.
To generate Javadocs with Gradle, use the `gradlew javadoc` command. To view the Javadocs simply go to `build/docs/javadoc/` and open `index.html` in a web browser.

## Version Control
We've adopted the [git flow branching model](http://nvie.com/posts/a-successful-git-branching-model/) in our projects. The creators of git flow released a [short intro video](http://vimeo.com/16018419) to explain the model.

The `master` branch is production-ready, but is not yet vetted for release. Only small patches and `hotfix/x` branches are pushed to `master`, and will always have a release version. The `develop` and `stage` branches are pre-production, and are where we push `feature/x` branches for testing.

Our release branches are named by version number, e.g. `1.0` and `1.1`. We begin release branches with a beta (b1) designation and progress them through release candidate to stable. All open source releases (included pre-releases) are tagged.
The `master` branch is production-ready and contains the latest tagged releases. Before a release is made, it is stagged in `release/x` branches before being pushed and tagged in the `master` branch. Small patches from `hotfix/x` branches are also pushed to `master`, and will always have a release version. The `develop` branch is pre-production, and is where we push `feature/x` branches for testing.

## Legal Stuff
Flow Networking is licensed under the [MIT License][License]. Basically, you can do whatever you want as long as you include the original copyright. Please see the `LICENSE.txt` file for details.
Flow Network is licensed under the [MIT License][License]. Basically, you can do whatever you want as long as you include the original copyright. Please see the `LICENSE.txt` file for details.

## Credits
* [Spout](https://spout.org/) and contributors - *where we all began, and for much of the re-licensed code.*
* All the people behind [Java](http://www.oracle.com/technetwork/java/index.html), [Maven](http://maven.apache.org/), and [Gradle](http://www.gradle.org/).
* All the people behind [Java](http://www.oracle.com/technetwork/java/index.html), [Maven](https://maven.apache.org/), and [Gradle](https://www.gradle.org/).

[Donate]: https://flattr.com/submit/auto?user_id=spout&url=https://github.com/flow/flow-networking&title=Flow+Networking&language=Java&tags=github&category=software
[License]: https://tldrlegal.com/license/mit-license
[Donate]: https://flattr.com/submit/auto?user_id=spout&url=https://github.com/flow/network&title=Flow+Network&language=Java&tags=github&category=software
[License]: https://tldrlegal.com/l/mit
57 changes: 36 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@
defaultTasks 'clean', 'licenseFormat', 'build', 'install'

// Apply plugins
apply plugin: 'cobertura'
apply plugin: 'coveralls'
apply plugin: 'java'
apply plugin: 'cobertura' // Coveralls dependency
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'license'
apply plugin: 'maven'
apply plugin: 'signing'

// Project information
ext.projectName = 'Flow Networking'
ext.projectName = 'Flow Network'
group = 'com.flowpowered'
archivesBaseName = 'flow-networking'
archivesBaseName = 'flow-network'
version = '1.0.0-SNAPSHOT'
ext.packaging = 'jar'
ext.inceptionYear = '2013'
ext.url = 'http://flowpowered.com'
ext.description = 'Flexible serialization and configuration library for the Flow collection.'
ext.url = 'https://flowpowered.com/network'
ext.description = 'Network library for the Flow collection.'

// Organization information
ext.organization = 'Spout LLC'
ext.organizationUrl = 'https://spout.org'
ext.organization = 'Flow Powered'
ext.organizationUrl = 'https://flowpowered.com'

// Build properties
ext.buildNumber = project.hasProperty('buildNumber') ? buildNumber : '0'
Expand All @@ -38,9 +39,9 @@ buildscript {
}
}
dependencies {
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.9.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:0.5.0'
classpath 'net.saliman:gradle-cobertura-plugin:2.2.4' // Coveralls plugin dependency
classpath 'net.saliman:gradle-cobertura-plugin:2.3.0' // Coveralls dependency
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.10.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0x'
}
}

Expand All @@ -56,12 +57,12 @@ repositories {

// Project dependencies
dependencies {
compile 'io.netty:netty-all:4.0.21.Final'
compile 'org.slf4j:slf4j-api:1.7.7'
testCompile 'junit:junit:4.11'
compile 'io.netty:netty-all:4.0.33.Final'
compile 'org.slf4j:slf4j-api:1.7.13'
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-library:1.3'
testCompile 'org.powermock:powermock-api-mockito:1.5.5'
testCompile 'org.powermock:powermock-module-junit4:1.5.5'
testCompile 'org.powermock:powermock-api-mockito:1.6.4'
testCompile 'org.powermock:powermock-module-junit4:1.6.4'
}

// Filter, process, and include resources
Expand Down Expand Up @@ -103,6 +104,15 @@ jar.manifest.mainAttributes(
'Specification-Version': version + '+' + ciSystem + '-b' + buildNumber + '.git-' + commit,
'Specification-Vendor': organization + ' - ' + organizationUrl)

// Javadoc doclint configuration
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}

// Coveralls report configuration
cobertura.coverageFormats = ['html', 'xml'] // Coveralls requires xml format

Expand Down Expand Up @@ -161,15 +171,15 @@ uploadArchives {
description project.ext.description

scm {
connection 'scm:git:git://github.com/flow/flow-networking.git'
developerConnection 'scm:git:ssh://[email protected]:flow/flow-networking.git'
url 'https://github.com/flow/flow-networking'
connection 'scm:git:git://github.com/flow/network.git'
developerConnection 'scm:git:ssh://[email protected]:flow/network.git'
url 'https://github.com/flow/network'
}

licenses {
license {
name 'MIT License'
url 'https://tldrlegal.com/license/mit-license'
url 'https://tldrlegal.com/l/mit'
distribution 'repo'
}
}
Expand All @@ -180,6 +190,11 @@ uploadArchives {
}

developers {
developer {
id 'DDoS'
name 'Aleksi Sapon'
email '[email protected]'
}
developer {
id 'kitskub'
name 'Jack Huey'
Expand All @@ -191,7 +206,7 @@ uploadArchives {
email '[email protected]'
}
developer {
id 'Wulfspider'
id 'lukespragg'
name 'Luke Spragg'
email '[email protected]'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-2.0-bin.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-2.6-all.zip
Loading

0 comments on commit de2ad0a

Please sign in to comment.