-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build and test on java 11 #1291
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,12 @@ buildscript { | |
plugins { | ||
id 'java' | ||
id 'scala' | ||
id 'maven' | ||
id 'maven-publish' | ||
id 'signing' | ||
id 'jacoco' | ||
id 'com.palantir.git-version' version '0.11.0' | ||
id 'com.github.johnrengelman.shadow' version '2.0.4' | ||
id 'com.github.maiflai.scalatest' version '0.22' | ||
id 'com.github.johnrengelman.shadow' version '4.0.4' | ||
id 'com.github.maiflai.scalatest' version '0.23' | ||
} | ||
|
||
repositories { | ||
|
@@ -22,7 +22,6 @@ repositories { | |
jacocoTestReport { | ||
group = "Reporting" | ||
description = "Generate Jacoco coverage reports after running tests." | ||
additionalSourceDirs = files(sourceSets.main.allJava.srcDirs) | ||
|
||
reports { | ||
xml.enabled = true // codecov depends on xml format report | ||
|
@@ -38,7 +37,7 @@ dependencies { | |
compile "org.tukaani:xz:1.5" | ||
compile "gov.nih.nlm.ncbi:ngs-java:2.9.0" | ||
|
||
testCompile "org.scala-lang:scala-library:2.12.6" | ||
testCompile "org.scala-lang:scala-library:2.12.8" | ||
testCompile "org.scalatest:scalatest_2.12:3.0.5" | ||
testRuntime 'org.pegdown:pegdown:1.6.0' // Necessary for generating HTML reports with ScalaTest | ||
testCompile "org.testng:testng:6.14.3" | ||
|
@@ -58,6 +57,8 @@ group = 'com.github.samtools' | |
|
||
defaultTasks 'jar' | ||
|
||
|
||
|
||
jar { | ||
manifest { | ||
attributes 'Implementation-Title': 'HTSJDK', | ||
|
@@ -141,92 +142,79 @@ task testExternalApis(type: Test) { | |
} | ||
|
||
wrapper { | ||
gradleVersion = '4.8.1' | ||
gradleVersion = '5.2.1' | ||
} | ||
|
||
// 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') | ||
} | ||
tasks.withType(Javadoc) { | ||
options.addStringOption('Xdoclint:none', '-quiet') | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
archiveClassifier.set('javadoc') | ||
from 'build/docs/javadoc' | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from sourceSets.main.allSource | ||
classifier = 'sources' | ||
} | ||
|
||
/** | ||
* This specifies what artifacts will be built and uploaded when performing a maven upload. | ||
*/ | ||
artifacts { | ||
archives jar | ||
archives javadocJar | ||
archives sourcesJar | ||
archiveClassifier.set('sources') | ||
} | ||
|
||
/** | ||
* Sign non-snapshot releases with our secret key. This should never need to be invoked directly. | ||
*/ | ||
signing { | ||
required { isRelease && gradle.taskGraph.hasTask("uploadArchives") } | ||
required { isRelease && gradle.taskGraph.hasTask("publishHtsjdkPublicationToMavenRepository") } | ||
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 { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
publishing { | ||
publications { | ||
htsjdk(MavenPublication) { | ||
from components.java | ||
artifact javadocJar | ||
artifact sourcesJar | ||
|
||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
authentication(userName: project.findProperty("sonatypeUsername"), password: project.findProperty("sonatypePassword")) | ||
} | ||
|
||
snapshotRepository(url: "https://broadinstitute.jfrog.io/broadinstitute/libs-snapshot-local/") { | ||
authentication(userName: System.env.ARTIFACTORY_USERNAME, password: System.env.ARTIFACTORY_PASSWORD) | ||
} | ||
|
||
pom.project { | ||
name 'HTSJDK' | ||
packaging 'jar' | ||
description 'A Java API for high-throughput sequencing data (HTS) formats' | ||
url 'http://samtools.github.io/htsjdk/' | ||
pom { | ||
name = 'HTSJDK' | ||
packaging = 'jar' | ||
description = 'A Java API for high-throughput sequencing data (HTS) formats' | ||
url = 'http://samtools.github.io/htsjdk/' | ||
|
||
developers { | ||
developer { | ||
id 'picard' | ||
name 'Picard Team' | ||
url 'http://broadinstitute.github.io/picard' | ||
id = 'picard' | ||
name = 'Picard Team' | ||
url = 'http://broadinstitute.github.io/picard' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated and tangential, but this seems like ancient history. And if you look there, you see nothing about htsjdk. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I noticed that too but decided to leave it for later... I'll open a follow up to change it. Not sure to what though... |
||
} | ||
} | ||
|
||
scm { | ||
url '[email protected]:samtools/htsjdk.git' | ||
connection 'scm:git:[email protected]:samtools/htsjdk.git' | ||
url = '[email protected]:samtools/htsjdk.git' | ||
connection = 'scm:git:[email protected]:samtools/htsjdk.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'MIT License' | ||
url 'http://opensource.org/licenses/MIT' | ||
distribution 'repo' | ||
name = 'MIT License' | ||
url = 'http://opensource.org/licenses/MIT' | ||
distribution = 'repo' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
doFirst { | ||
System.out.println("Uploading version $version") | ||
|
||
repositories { | ||
maven { | ||
credentials { | ||
username = isRelease ? project.findProperty("sonatypeUsername") : System.env.ARTIFACTORY_USERNAME | ||
password = isRelease ? project.findProperty("sonatypePassword") : System.env.ARTIFACTORY_PASSWORD | ||
} | ||
def release = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshot = "https://broadinstitute.jfrog.io/broadinstitute/libs-snapshot-local/" | ||
url = isRelease ? release : snapshot | ||
} | ||
} | ||
} | ||
|
||
task install(dependsOn:publishToMavenLocal) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ APP_NAME="Gradle" | |
APP_BASE_NAME=`basename "$0"` | ||
|
||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. | ||
DEFAULT_JVM_OPTS="" | ||
DEFAULT_JVM_OPTS='"-Xmx64m"' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wondering what triggered this change ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rebuilding the wrapper triggered it. I think they reduced gradle's memory requirement so they added a small default one. |
||
|
||
# Use the maximum available, or set MAX_FD != -1 to use that value. | ||
MAX_FD="maximum" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the uppercase 'H' in "Htsjdk" significant? It seems to work ok locally (it winds up in "htsjdk"ok).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe it's meaningful. I think it's case insensitive but the examples on the gradle website use camel case so I did as well.