From ce4c9edd1f06771a2a5e126272eee52b3f568005 Mon Sep 17 00:00:00 2001 From: Thad House Date: Wed, 25 Oct 2017 10:52:35 -0700 Subject: [PATCH] Fixes halsim_print to not try and build when the 'onlyAthena' flag has been set (#685) Building a non-athena library in athena only is not possible. --- simulation/halsim_print/build.gradle | 30 +++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/simulation/halsim_print/build.gradle b/simulation/halsim_print/build.gradle index dec160a6e8..4ca90a8a0a 100644 --- a/simulation/halsim_print/build.gradle +++ b/simulation/halsim_print/build.gradle @@ -3,24 +3,26 @@ description = "A simulation shared object that simply prints robot behaviors" apply plugin: 'edu.wpi.first.NativeUtils' apply plugin: 'cpp' -ext.skipAthena = true +if (!project.hasProperty('onlyAthena')) { + ext.skipAthena = true -apply from: "../../config.gradle" + apply from: "../../config.gradle" -model { - components { - halsim_print(NativeLibrarySpec) - } - - binaries { - all { - project(':hal').addHalCompilerArguments(it) - project(':hal').addHalToLinker(it) + model { + components { + halsim_print(NativeLibrarySpec) } - withType(StaticLibraryBinarySpec) { - it.buildable = false + + binaries { + all { + project(':hal').addHalCompilerArguments(it) + project(':hal').addHalToLinker(it) + } + withType(StaticLibraryBinarySpec) { + it.buildable = false + } } } + apply from: 'publish.gradle' } -apply from: 'publish.gradle'