Adds support for specifying output suffix of arm packages. (#34)

Currently if using a separate compiler prefix, it would get published to
the arm classifier. This modifies so the output suffix can now be
specified (e.g. "hf" for armhf).
This commit is contained in:
Thad House
2017-01-04 01:38:37 -08:00
committed by Peter Johnson
parent 593ba37c43
commit a3adb38bef
2 changed files with 16 additions and 3 deletions

View File

@@ -178,7 +178,12 @@ def cscoreZipTask = { project ->
group = 'WPILib'
destinationDir = project.buildDir
baseName = 'cscore'
classifier = "${project.buildPlatform}"
if (project.isArm && project.hasProperty('compilerPrefix')
&& project.hasProperty('armSuffix')) {
classifier = "${project.buildPlatform}${project.armSuffix}"
} else {
classifier = "${project.buildPlatform}"
}
duplicatesStrategy = 'exclude'
from(file('include')) {

View File

@@ -8,7 +8,13 @@ ext.useWpiUtil = { project ->
def wpiUtil
doFirst {
def wpiUtilDependency = project.dependencies.create("edu.wpi.first.wpilib:wpiutil:+:${project.isArm ? 'arm' : 'desktop'}@zip")
def wpiUtilDependency
if (project.isArm && project.hasProperty('compilerPrefix') && project.hasProperty('armSuffix')) {
wpiUtilDependency = project.dependencies.create("edu.wpi.first.wpilib:wpiutil:+:arm${project.armSuffix}@zip")
} else {
wpiUtilDependency = project.dependencies.create("edu.wpi.first.wpilib:wpiutil:+:${project.isArm ? 'arm' : 'desktop'}@zip")
}
def wpiUtilConfig = project.configurations.detachedConfiguration(wpiUtilDependency)
wpiUtilConfig.setTransitive(false)
wpiUtil = wpiUtilConfig.files[0].canonicalFile
@@ -59,7 +65,9 @@ ext.useWpiUtil = { project ->
}
ext.getOpenCvPlatformPackage = { targetPlatform ->
if (targetPlatform.architecture.arm) {
if (targetPlatform.architecture.arm && project.hasProperty('compilerPrefix') && project.hasProperty('armSuffix')) {
return "linux-arm${project.armSuffix}"
} else if (targetPlatform.architecture.arm) {
return 'linux-arm'
} else if (targetPlatform.operatingSystem.linux) {
if (targetPlatform.architecture.amd64) {