From 9f5f6111d44dfb944662fac1bd488a25d718991e Mon Sep 17 00:00:00 2001 From: Thad House Date: Sat, 12 Aug 2017 23:51:25 -0700 Subject: [PATCH] Add a cpp dev run task. (#17) --- build.gradle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build.gradle b/build.gradle index 5aeabcd8e0..2374b8b46d 100644 --- a/build.gradle +++ b/build.gradle @@ -109,6 +109,26 @@ model { } } } + tasks { + def c = $.components + project.tasks.create('runCpp', Exec) { + def found = false + c.each { + if (it in NativeExecutableSpec && it.name == 'wpiutilDev') { + it.binaries.each { + if (!found) { + def arch = it.targetPlatform.architecture.name + if (arch == 'x86-64' || arch == 'x86') { + dependsOn it.tasks.install + commandLine it.tasks.install.runScript + found = true + } + } + } + } + } + } + } } apply from: 'publish.gradle'