Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Commit

Permalink
Adds an all artifact to the published libraries (#217)
Browse files Browse the repository at this point in the history
Better then the old desktop zips because it will include all artifacts
built, not just specifically the desktop ones. Also, the individual
artifacts are published as well so users can decide which artifacts they
specifically want, and can help decrease download sizes. The cpp plugin
will continue using the individual artifacts.
  • Loading branch information
ThadHouse authored and PeterJohnson committed Aug 8, 2017
1 parent 4b8ef57 commit ccfeab5
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,44 @@ model {
}
})

def allJniTask
if (!project.hasProperty('jenkinsBuild')) {
allJniTask = project.tasks.create("ntcoreJNIAllJar", Jar) {
description = 'Creates a jar with all JNI artifacts'
classifier = 'all'
baseName = 'jnijnintcorentcoreJNI'
destinationDir = outputsFolder
duplicatesStrategy = 'exclude'

ntcoreJNITaskList.each {
it.outputs.files.each {
from project.zipTree(it)
}
dependsOn it
}
}
project.build.dependsOn allJniTask
}

def allCppTask
if (!project.hasProperty('jenkinsBuild')) {
allCppTask = project.tasks.create("ntcoreAllZip", Zip) {
description = 'Creates a zip with all Cpp artifacts'
classifier = 'all'
baseName = 'zipcppntcorentcore'
destinationDir = outputsFolder
duplicatesStrategy = 'exclude'

ntcoreTaskList.each {
it.outputs.files.each {
from project.zipTree(it)
}
dependsOn it
}
}
project.build.dependsOn allCppTask
}

publications {
cpp(MavenPublication) {
ntcoreTaskList.each {
Expand All @@ -190,6 +228,10 @@ model {
artifact cppHeadersZip
artifact cppSourcesZip

if (!project.hasProperty('jenkinsBuild')) {
artifact allCppTask
}

artifactId = "${baseArtifactId}-cpp"
groupId artifactGroupId
version pubVersion
Expand All @@ -199,6 +241,10 @@ model {
artifact it
}

if (!project.hasProperty('jenkinsBuild')) {
artifact allJniTask
}

artifactId = "${baseArtifactId}-jni"
groupId artifactGroupId
version pubVersion
Expand Down

0 comments on commit ccfeab5

Please sign in to comment.