mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
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:
committed by
Peter Johnson
parent
593ba37c43
commit
a3adb38bef
@@ -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')) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user