mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
72 lines
1.6 KiB
Groovy
72 lines
1.6 KiB
Groovy
apply plugin: 'maven-publish'
|
|
apply plugin: 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin'
|
|
|
|
if (!hasProperty('releaseType')) {
|
|
WPILibVersion {
|
|
releaseType = 'dev'
|
|
}
|
|
}
|
|
|
|
def pubVersion = ''
|
|
if (project.hasProperty("publishVersion")) {
|
|
pubVersion = project.publishVersion
|
|
} else {
|
|
pubVersion = WPILibVersion.version
|
|
}
|
|
|
|
def baseArtifactId = 'halsim-adx_gyro_accelerometer'
|
|
def artifactGroupId = 'edu.wpi.first.halsim'
|
|
|
|
def outputsFolder = file("$project.buildDir/outputs")
|
|
|
|
task cppHeadersZip(type: Zip) {
|
|
destinationDir = outputsFolder
|
|
baseName = 'halsim-adx_gyro_accelerometer'
|
|
classifier = "headers"
|
|
|
|
from(licenseFile) {
|
|
into '/'
|
|
}
|
|
|
|
from('src/main/native/include') {
|
|
into '/'
|
|
}
|
|
}
|
|
|
|
task cppSourcesZip(type: Zip) {
|
|
destinationDir = outputsFolder
|
|
baseName = 'halsim-adx_gyro_accelerometer'
|
|
classifier = "sources"
|
|
|
|
from(licenseFile) {
|
|
into '/'
|
|
}
|
|
|
|
from('src/main/native/cpp') {
|
|
into '/'
|
|
}
|
|
}
|
|
|
|
build.dependsOn cppSourcesZip
|
|
build.dependsOn cppHeadersZip
|
|
|
|
model {
|
|
publishing {
|
|
def libSpec = createComponentZipTasks($.components, 'halsim_adx_gyro_accelerometer', 'zipcpp', Zip, project, includeStandardZipFormat)
|
|
|
|
publications {
|
|
cpp(MavenPublication) {
|
|
artifactId = baseArtifactId
|
|
groupId artifactGroupId
|
|
version pubVersion
|
|
|
|
libSpec.each {
|
|
artifact it
|
|
}
|
|
artifact cppHeadersZip
|
|
artifact cppSourcesZip
|
|
}
|
|
}
|
|
}
|
|
}
|