This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Nike-Inc/feature/shaded-fatjar
Use the Shadow Jar plugin to create a shaded jar that has our depende…
- Loading branch information
Showing
6 changed files
with
37 additions
and
60 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
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 |
---|---|---|
|
@@ -14,6 +14,6 @@ | |
# limitations under the License. | ||
# | ||
|
||
version=1.1.0 | ||
version=1.2.0 | ||
groupId=com.nike | ||
artifactId=cerberus-client |
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 |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
def createPomOutputLocation = "${project.buildDir}/libs/pom.xml" | ||
def bintrayUser = project.hasProperty('bintrayUser') ? project.bintrayUser : System.getenv('BINTRAY_USER') ?: '' | ||
def bintrayKey = project.hasProperty('bintrayKey') ? project.bintrayKey : System.getenv('BINTRAY_KEY') ?: '' | ||
def bintrayVersion = "$version" | ||
|
@@ -24,7 +23,7 @@ bintray { | |
key = bintrayKey | ||
dryRun = false | ||
publish = true | ||
publications = ['mavenInfo'] | ||
publications = ['jar'] | ||
|
||
pkg { | ||
repo = 'maven' | ||
|
@@ -62,52 +61,15 @@ artifacts { | |
archives sourcesJar | ||
} | ||
|
||
task createPom << { | ||
pom { | ||
project { | ||
groupId groupId | ||
artifactId artifactId | ||
version version | ||
name artifactId | ||
description "Cerberus Client" | ||
url 'https://github.com/Nike-Inc/cerberus-java-client' | ||
inceptionYear '2016' | ||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
scm { | ||
url 'https://github.com/Nike-Inc/cerberus-java-client' | ||
connection '[email protected]:Nike-Inc/cerberus-java-client.git' | ||
} | ||
organization { | ||
name 'Nike' | ||
url 'http://nike-inc.github.io' | ||
} | ||
} | ||
}.writeTo(createPomOutputLocation) | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenInfo(MavenPublication) { | ||
from components.java | ||
jar(MavenPublication) { | ||
from components.shadow | ||
|
||
artifact sourcesJar | ||
artifact javadocJar | ||
|
||
pom.withXml { | ||
// The pom produced by this task is questionable - ALL dependencies are set to runtime rather than how we set them up in the build.gradle files. | ||
// Unfortunately we need to use this task anyway for the bintray gradle plugin. | ||
// Therefore we'll just wipe out the pom this produces and use one created by the normal maven plugin (see the createPom task) instead. | ||
asString().delete(0, Integer.MAX_VALUE).append(new File(createPomOutputLocation).text) | ||
} | ||
} | ||
} | ||
} | ||
|
||
bintrayUpload.dependsOn(createPom) | ||
assemble.finalizedBy(createPom) | ||
bintrayUpload.dependsOn(shadowJar) |
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