-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add scoverage, use gradle 4.8.1, update nebula versions * publishing and signing build logic * fake javadoc * set groupId in buildscript * minor cleanup
- Loading branch information
Showing
6 changed files
with
76 additions
and
6 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
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 |
---|---|---|
|
@@ -11,6 +11,8 @@ allprojects { | |
apply plugin: 'nebula.release' | ||
apply plugin: "nebula.maven-resolved-dependencies" | ||
apply plugin: "org.scoverage" | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
} | ||
|
||
buildscript { | ||
|
@@ -113,7 +115,13 @@ task sourcesJar(type: Jar) { | |
from sourceSets.main.allSource | ||
} | ||
|
||
// TODO make sure the dependencies are set up for this task | ||
// fake javadoc jar to pass sonatype rules | ||
// See https://central.sonatype.org/pages/requirements.html | ||
task javadocJar(type: Jar) { | ||
classifier = 'javadoc' | ||
from new File('javadoc-fake') | ||
} | ||
|
||
task scaladocJar(type: Jar) { | ||
classifier = 'scaladoc' | ||
from scaladoc.destinationDir | ||
|
@@ -202,3 +210,63 @@ checkScoverage { | |
coverageType = 'Statement' | ||
minimumRate = 0.92 | ||
} | ||
|
||
/** | ||
* @return true iff we are building a maven snapshot or a devSnapshot. | ||
*/ | ||
static boolean isSnapshot(String inferredVersion) { | ||
inferredVersion.endsWith("-SNAPSHOT") || inferredVersion.contains("-dev.") || inferredVersion.contains(".dev.") | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
groupId = 'com.workday.warp' | ||
artifactId = 'warp-core' | ||
from components.java | ||
artifact sourcesJar | ||
artifact javadocJar | ||
artifact scaladocJar | ||
pom { | ||
name = 'warp-core' | ||
description = 'A library for scientific performance testing.' | ||
url = 'https://workday.github.io/warp-core/' | ||
licenses { | ||
license { | ||
name = 'MIT License' | ||
url = 'https://opensource.org/licenses/mit-license.php' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'tomnis' | ||
name = 'tomas mccandless' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/Workday/warp-core.git' | ||
developerConnection = 'scm:git:ssh://github.com:Workday/warp-core.git' | ||
url = 'https://github.com/Workday/warp-core/tree/master' | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
credentials { | ||
// will be null if these aren't set as project properties | ||
username findProperty("sonatypeUsername") | ||
password findProperty("sonatypePassword") | ||
} | ||
String snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots' | ||
String releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2' | ||
url = isSnapshot(version.toString()) ? snapshotsRepoUrl : releasesRepoUrl | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications.mavenJava | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Tue Dec 12 12:59:33 PST 2017 | ||
#Wed Aug 08 13:44:00 PDT 2018 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip |
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,2 @@ | ||
Included here is fake javadoc to pass sonatype upload checks. | ||
See https://central.sonatype.org/pages/requirements.html |
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