mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Adds the rest of the data needed for a publish on jenkins (#628)
This commit is contained in:
committed by
Peter Johnson
parent
e444b6015c
commit
c572e6a307
30
build.gradle
30
build.gradle
@@ -135,6 +135,36 @@ if (!hasProperty('releaseType')) {
|
||||
}
|
||||
}
|
||||
|
||||
def pubVersion
|
||||
if (project.hasProperty("publishVersion")) {
|
||||
pubVersion = project.publishVersion
|
||||
} else {
|
||||
pubVersion = WPILibVersion.version
|
||||
}
|
||||
|
||||
def outputsFolder = file("$buildDir/outputs")
|
||||
|
||||
def versionFile = file("$outputsFolder/version.txt")
|
||||
|
||||
task outputVersions() {
|
||||
description = 'Prints the versions of wpilib to a file for use by the downstream packaging project'
|
||||
group = 'Build'
|
||||
outputs.files(versionFile)
|
||||
|
||||
doFirst {
|
||||
buildDir.mkdir()
|
||||
outputsFolder.mkdir()
|
||||
}
|
||||
|
||||
doLast {
|
||||
versionFile.write pubVersion
|
||||
}
|
||||
}
|
||||
|
||||
task build() {}
|
||||
|
||||
build.dependsOn outputVersions
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete buildDir
|
||||
}
|
||||
|
||||
@@ -17,8 +17,11 @@ if (project.hasProperty("publishVersion")) {
|
||||
def baseArtifactId = 'hal'
|
||||
def artifactGroupId = 'edu.wpi.first.hal'
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
task cppSourcesZip(type: Zip) {
|
||||
destinationDir = project.buildDir
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'hal'
|
||||
classifier = "sources"
|
||||
|
||||
from(licenseFile) {
|
||||
@@ -39,7 +42,8 @@ task cppSourcesZip(type: Zip) {
|
||||
}
|
||||
|
||||
task cppHeadersZip(type: Zip) {
|
||||
destinationDir = project.buildDir
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'hal'
|
||||
classifier = "headers"
|
||||
|
||||
from(licenseFile) {
|
||||
@@ -51,6 +55,10 @@ task cppHeadersZip(type: Zip) {
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn cppHeadersZip
|
||||
build.dependsOn cppSourcesZip
|
||||
|
||||
|
||||
model {
|
||||
publishing {
|
||||
def halAthenaTaskList = []
|
||||
|
||||
@@ -33,8 +33,11 @@ ext.addNiLibrariesToLinker = { binary->
|
||||
}
|
||||
}
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
task libZip(type: Zip) {
|
||||
destinationDir = project.buildDir
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'nilibraries-classifier'
|
||||
classifier = "linuxathena"
|
||||
|
||||
from('lib') {
|
||||
@@ -43,7 +46,8 @@ task libZip(type: Zip) {
|
||||
}
|
||||
|
||||
task headersZip(type: Zip) {
|
||||
destinationDir = project.buildDir
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'nilibraries-classifier'
|
||||
classifier = "headers"
|
||||
|
||||
from('include') {
|
||||
@@ -51,6 +55,11 @@ task headersZip(type: Zip) {
|
||||
}
|
||||
}
|
||||
|
||||
task build() {}
|
||||
|
||||
build.dependsOn headersZip
|
||||
build.dependsOn libZip
|
||||
|
||||
apply from: 'publish.gradle'
|
||||
|
||||
task patchNiLibraries() {
|
||||
|
||||
@@ -17,7 +17,6 @@ if (project.hasProperty("publishVersion")) {
|
||||
def baseArtifactId = 'ni-libraries'
|
||||
def artifactGroupId = 'edu.wpi.first.ni-libraries'
|
||||
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
nilibraries(MavenPublication) {
|
||||
|
||||
@@ -17,8 +17,11 @@ if (project.hasProperty("publishVersion")) {
|
||||
def baseArtifactId = 'wpilibc'
|
||||
def artifactGroupId = 'edu.wpi.first.wpilibc'
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
task cppSourcesZip(type: Zip) {
|
||||
destinationDir = project.buildDir
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'wpilibc'
|
||||
classifier = "sources"
|
||||
|
||||
from(licenseFile) {
|
||||
@@ -31,7 +34,8 @@ task cppSourcesZip(type: Zip) {
|
||||
}
|
||||
|
||||
task cppHeadersZip(type: Zip) {
|
||||
destinationDir = project.buildDir
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'wpilibc'
|
||||
classifier = "headers"
|
||||
|
||||
from(licenseFile) {
|
||||
@@ -43,11 +47,14 @@ task cppHeadersZip(type: Zip) {
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn cppHeadersZip
|
||||
build.dependsOn cppSourcesZip
|
||||
|
||||
def linkFile = project.file("${buildDir}/libwpi.so")
|
||||
|
||||
task linkScriptZip(type: Zip) {
|
||||
destinationDir = project.buildDir
|
||||
baseName = 'zipwpiliblinkscript'
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'wpilibclinkscript-classifier'
|
||||
classifier = "linuxathena"
|
||||
|
||||
from(licenseFile) {
|
||||
@@ -58,6 +65,8 @@ task linkScriptZip(type: Zip) {
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn linkScriptZip
|
||||
|
||||
model {
|
||||
publishing {
|
||||
def wpilibCTaskList = createComponentZipTasks($.components, 'wpilibc', 'zipcpp', Zip, project, includeStandardZipFormat)
|
||||
|
||||
@@ -17,8 +17,11 @@ if (project.hasProperty("publishVersion")) {
|
||||
def baseArtifactId = 'wpilibj'
|
||||
def artifactGroupId = 'edu.wpi.first.wpilibj'
|
||||
|
||||
def outputsFolder = file("$project.buildDir/outputs")
|
||||
|
||||
task cppSourcesZip(type: Zip) {
|
||||
destinationDir = project.buildDir
|
||||
destinationDir = outputsFolder
|
||||
baseName = 'wpilibJNI'
|
||||
classifier = "sources"
|
||||
|
||||
from(licenseFile) {
|
||||
@@ -61,6 +64,12 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
if (project.hasProperty('jenkinsBuild')) {
|
||||
jar {
|
||||
classifier = 'javaArtifact'
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
|
||||
Reference in New Issue
Block a user