-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified annotations and command line parsers.
- Loading branch information
Showing
30 changed files
with
5,917 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.DS_Store | ||
.gradle | ||
*.iml | ||
build | ||
.idea | ||
gradlew.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
language: java | ||
dist: trusty | ||
sudo: true | ||
before_cache: | ||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | ||
cache: | ||
directories: | ||
- $HOME/.gradle/caches/ | ||
- $HOME/.gradle/wrapper/ | ||
- $HOME/.m2 | ||
jdk: | ||
- oraclejdk8 | ||
script: ./gradlew jacocoTestReport ; | ||
env: | ||
matrix: | ||
- ARTIFACTORY_USERNAME=gatkci | ||
global: | ||
secure: rF9xJaWR1LRF6y0Ujq+zvfg2wO0DRgs1vqoUgS9BoHuXKRDNWyiEYbX0Mxef5LxXgqHSoIxirIBnjGxpDYaM+kRwNm1IqcW/C5Z5slKY12lbwFgTFdROfKS4lGMVo6U5/w+hyknrEVxEV4ULw7I2Z4sUWHU0X+uOhf7JP2sYTXcl0kyUPP4crSAMGQ+J/Epc4mvmxuNaSCbAq74+JW+GJ8KqbEmrDPRBpDFAoeISjmnmXGlvPECgIuPjFp3pJ3nOv3hDJqIb6jWs8Jt2w4xeByg4ENPI2z+oAzWM7QqqyybK706LMy/jppNqVa3AOUCCiQIjTnJYgapAthIatfSrJrtwKxmrxyq1v2XfPuXqeMi3PB8Yz/ikOWk2dWU/XQnqV9u1ZEuFwcs+0InsDVVYkLQ3A7RJ570CdDYsqejzdGDk25r+BIxob8TViCneG1UzWydKd3XFmtaxLORMWqu0vyoQ6OM+w7Yc9x1fJm+yW458UplKdQW9yyxcMl9uFMcn/shwTPlPDIN/ktVsF1Q8bA7fGl9WEoxRtpXZYtNhhTkI9zTLMGjU8JZhTfV6QGmEbtGs1+uD2HAFWueuoRiHGlH+uqIapjCK81hWUcIwY6Q1B0bvVnjw58ifst/irB4pP82SzC0KQXxNzjBVLpU275/inhmA9/ZTji/7wHFgqIk= | ||
after_success: | ||
- echo "TRAVIS_BRANCH='$TRAVIS_BRANCH'"; echo "JAVA_HOME='$JAVA_HOME'"; | ||
- bash <(curl -s https://codecov.io/bash); if [ "$TRAVIS_BRANCH" == "master" ]; then | ||
./gradlew uploadArchives; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Copyright (c) 2009-2016, GATK Authors. All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name Broad Institute, Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
# barclay | ||
Command line argument parser and online documentation generation utilities for java command line programs. | ||
[](https://opensource.org/licenses/BSD-3-Clause) | ||
|
||
|
||
# Barclay (Under Construction) | ||
Barclay is a set of classes for annotating, parsing, validating, and generating documentation for command line options. | ||
|
||
##Requirements | ||
* Java 8 | ||
* Gradle 3.1 or greater. We recommend using the `./gradlew` script which will | ||
download and use an appropriate gradle version automatically. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
|
||
plugins { | ||
id "java" | ||
id 'maven' | ||
id 'signing' | ||
id 'jacoco' | ||
id 'com.palantir.git-version' version '0.5.1' //version helper | ||
} | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
||
group = 'org.broadinstitute' | ||
|
||
final isRelease = Boolean.getBoolean("release") | ||
version = (isRelease ? gitVersion() : gitVersion() + "-SNAPSHOT").replaceAll(".dirty", "") | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
url "https://artifactory.broadinstitute.org/artifactory/libs-snapshot/" //for Broad snapshots | ||
} | ||
|
||
mavenLocal() | ||
} | ||
|
||
jacocoTestReport { | ||
dependsOn test | ||
group = "Reporting" | ||
description = "Generate Jacoco coverage reports after running tests." | ||
additionalSourceDirs = files(sourceSets.main.allJava.srcDirs) | ||
|
||
reports { | ||
xml.enabled = true // codecov plugin depends on xml format report | ||
html.enabled = true | ||
} | ||
} | ||
|
||
compileJava { | ||
options.compilerArgs = ['-proc:none', '-Xlint:all','-Werror','-Xdiags:verbose'] | ||
} | ||
compileTestJava { | ||
options.compilerArgs = ['-proc:none', '-Xlint:all','-Werror','-Xdiags:verbose'] | ||
} | ||
|
||
dependencies { | ||
compile 'net.sf.jopt-simple:jopt-simple:5.0.3' | ||
|
||
compile 'org.apache.commons:commons-lang3:3.4' | ||
compile 'org.apache.logging.log4j:log4j-api:2.3' | ||
compile 'org.apache.logging.log4j:log4j-core:2.3' | ||
|
||
testCompile 'org.testng:testng:6.9.6' | ||
} | ||
|
||
test { | ||
useTestNG() | ||
outputs.upToDateWhen { false } //tests will never be "up to date" so you can always rerun them | ||
|
||
// show standard out and standard error of the test JVM(s) on the console | ||
testLogging.showStandardStreams = true | ||
beforeTest { descriptor -> | ||
logger.lifecycle("Running Test: " + descriptor) | ||
} | ||
|
||
// listen to standard out and standard error of the test JVM(s) | ||
onOutput { descriptor, event -> | ||
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message ) | ||
} | ||
|
||
testLogging { | ||
testLogging { | ||
events "skipped", "failed" | ||
exceptionFormat = "full" | ||
} | ||
afterSuite { desc, result -> | ||
if (!desc.parent) { // will match the outermost suite | ||
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)" | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from 'build/docs/javadoc' | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from sourceSets.main.allSource | ||
classifier = 'sources' | ||
} | ||
|
||
// This is a hack to disable the java 8 default javadoc lint until we fix the html formatting | ||
if (JavaVersion.current().isJava8Compatible()) { | ||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
} | ||
} | ||
|
||
/** | ||
*This specifies what artifacts will be built and uploaded when performing a maven upload. | ||
*/ | ||
artifacts { | ||
archives jar | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
/** | ||
* Sign non-snapshot releases with our secret key. This should never need to be invoked directly. | ||
*/ | ||
signing { | ||
required { isRelease && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
/** | ||
* Upload a release to sonatype. You must be an authorized uploader and have your sonatype | ||
* username and password information in your gradle properties file. See the readme for more info. | ||
* | ||
* For releasing to your local maven repo, use gradle install | ||
*/ | ||
uploadArchives { | ||
doFirst { | ||
println "Attempting to upload version:$version" | ||
} | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: project.findProperty("sonatypeUsername"), password: project.findProperty("sonatypePassword")) | ||
} | ||
|
||
snapshotRepository(url: "https://artifactory.broadinstitute.org/artifactory/libs-snapshot-local/") { | ||
authentication(userName: System.env.ARTIFACTORY_USERNAME, password: System.env.ARTIFACTORY_PASSWORD) | ||
} | ||
|
||
pom.project { | ||
name 'Barclay' | ||
packaging 'jar' | ||
description 'Development on Barclay command line parsing and documentation utilities' | ||
url 'http://github.com/broadinstitute/barclay' | ||
|
||
scm { | ||
url 'scm:[email protected]:broadinstitute/barclay.git' | ||
connection 'scm:[email protected]:broadinstitute/barclay.git' | ||
developerConnection 'scm:[email protected]:broadinstitute/barclay.git' | ||
} | ||
|
||
developers { | ||
developer { | ||
id = "gatkdev" | ||
name = "GATK Development Team" | ||
email = "[email protected]" | ||
} | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'BSD 3-Clause' | ||
url 'https://github.com/broadinstitute/barclay/blob/master/LICENSE.TXT' | ||
distribution 'repo' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#Mon Nov 07 10:14:42 EST 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip |
Oops, something went wrong.