Add docs and lifecycle tasks for faster dev builds (#2182)

This commit is contained in:
Thad House
2019-12-20 13:48:26 -08:00
committed by Peter Johnson
parent ea4d1a39e1
commit 5e08bb28f8
9 changed files with 74 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ apply plugin: 'visual-studio'
apply plugin: 'edu.wpi.first.NativeUtils'
apply plugin: ExtraTasks
evaluationDependsOn(':hal')
apply from: '../shared/config.gradle'
ext.examplesMap = [:]
@@ -222,6 +224,25 @@ model {
}
apply from: 'publish.gradle'
model {
tasks {
def c = $.components
project.tasks.register('buildDesktopCpp') { compileTask->
def systemArch = getCurrentArch()
c.each {
if (it in NativeExecutableSpec && it.name) {
it.binaries.each {
def arch = it.targetPlatform.name
if (arch == systemArch && it.buildType.name == 'debug') {
compileTask.dependsOn it.tasks.link
}
}
}
}
}
}
}
ext {
templateDirectory = new File("$projectDir/src/main/cpp/templates/")
templateFile = new File("$projectDir/src/main/cpp/templates/templates.json")