diff --git a/build.gradle b/build.gradle index 8ce174a610..ce0e42dbb3 100644 --- a/build.gradle +++ b/build.gradle @@ -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' diff --git a/publish.gradle b/publish.gradle index 90d3c19de2..0e84a0a442 100644 --- a/publish.gradle +++ b/publish.gradle @@ -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, {