Adds an all artifact to the published libraries (#217)

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.
This commit is contained in:
Thad House
2017-08-07 17:42:58 -07:00
committed by Peter Johnson
parent 4b8ef57a99
commit ccfeab5ac9

View File

@@ -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 {
@@ -190,6 +228,10 @@ model {
artifact cppHeadersZip
artifact cppSourcesZip
if (!project.hasProperty('jenkinsBuild')) {
artifact allCppTask
}
artifactId = "${baseArtifactId}-cpp"
groupId artifactGroupId
version pubVersion
@@ -199,6 +241,10 @@ model {
artifact it
}
if (!project.hasProperty('jenkinsBuild')) {
artifact allJniTask
}
artifactId = "${baseArtifactId}-jni"
groupId artifactGroupId
version pubVersion