From a3adb38bef4dbfd7768ae4c73c6e3407160aea1a Mon Sep 17 00:00:00 2001 From: Thad House Date: Wed, 4 Jan 2017 01:38:37 -0800 Subject: [PATCH] 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). --- cscore.gradle | 7 ++++++- dependencies.gradle | 12 ++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cscore.gradle b/cscore.gradle index 47bad93a53..a0119cfdc4 100644 --- a/cscore.gradle +++ b/cscore.gradle @@ -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')) { diff --git a/dependencies.gradle b/dependencies.gradle index 0948342e29..a72e2bf1f7 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -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) {