mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Add a cpp dev run task. (#219)
This commit is contained in:
committed by
Peter Johnson
parent
0782164120
commit
ea028a3822
24
build.gradle
24
build.gradle
@@ -125,7 +125,7 @@ model {
|
||||
ext = 'zip'
|
||||
version = '+'
|
||||
sharedConfigs = [ ntcore: [],
|
||||
ntcoreExe: [],
|
||||
ntcoreDev: [],
|
||||
ntcoreTestingBaseTest: [] ]
|
||||
staticConfigs = [ ntcoreJNI: [] ]
|
||||
}
|
||||
@@ -159,7 +159,7 @@ model {
|
||||
}
|
||||
}
|
||||
if (!project.hasProperty('skipTestExe')) {
|
||||
ntcoreExe(NativeExecutableSpec) {
|
||||
ntcoreDev(NativeExecutableSpec) {
|
||||
sources {
|
||||
cpp {
|
||||
lib library: "ntcore"
|
||||
@@ -200,6 +200,26 @@ model {
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks {
|
||||
def c = $.components
|
||||
project.tasks.create('runCpp', Exec) {
|
||||
def found = false
|
||||
c.each {
|
||||
if (it in NativeExecutableSpec && it.name == 'ntcoreDev') {
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user