Fixes the sources zip to actually include all sources.

Change-Id: I54658aacd715c9c06e1625dbebb2933d09921df1
This commit is contained in:
Fredric Silberberg
2015-12-22 13:01:49 -05:00
parent 0537f9d0d7
commit 8cc066ecc4
2 changed files with 29 additions and 34 deletions

View File

@@ -161,37 +161,6 @@ def ntcoreZipTask = { project ->
}
}
def ntcoreSourceZipTask = { project ->
project.ext.ntcoreSourceZip = project.tasks.create("${project.isArm ? 'arm' : 'native'}NtcoreSourceZip", Zip) {
description = 'Creates a sources-zip of the ntcore source files'
group = 'WPILib'
destinationDir = project.buildDir
baseName = 'ntcore'
classifier = "sources"
from ('src') {
into 'src'
}
from('include') {
into 'include'
}
if (includeJava) {
from('java/lib') {
into 'src'
}
project.jniHeadersNetworkTables.outputs.each {
from(it) {
into 'include'
}
}
}
}
project.build.dependsOn project.ntcoreSourceZip
}
project(':arm') {
apply plugin: 'cpp'
@@ -205,7 +174,6 @@ project(':arm') {
setupModel(project, true)
ntcoreZipTask(project)
ntcoreSourceZipTask(project)
}
project(':native') {
@@ -235,7 +203,34 @@ project(':native') {
setupModel(project, false)
ntcoreZipTask(project)
ntcoreSourceZipTask(project)
}
task ntcoreSourceZip(type: Zip) {
description = 'Creates a sources-zip of the ntcore source files'
group = 'WPILib'
destinationDir = project.buildDir
baseName = 'ntcore'
classifier = "sources"
from ('src') {
into 'src'
}
from('include') {
into 'include'
}
if (includeJava) {
from('java/lib') {
into 'src'
}
project(':native').jniHeadersNetworkTables.outputs.each {
from(it) {
into 'include'
}
}
}
}
apply from: 'publish.gradle'

View File

@@ -29,7 +29,7 @@ publishing {
cpp(MavenPublication) {
artifact nat.ntcoreZip
artifact arm.ntcoreZip
artifact nat.ntcoreSourceZip
artifact ntcoreSourceZip
if (project.hasProperty('makeDesktop')) {
artifact nat.ntcoreZip, {