mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Adds header task to print out all headers (#704)
Will be used to create a generator for IDE's to get include paths.
This commit is contained in:
committed by
Peter Johnson
parent
45d48d6b5a
commit
bee9f1cb17
@@ -202,6 +202,32 @@ model {
|
||||
}
|
||||
}
|
||||
}
|
||||
getHeaders(Task) {
|
||||
def list = []
|
||||
$.components.each {
|
||||
if (it in NativeLibrarySpec && (it.name == 'halAthena' || it.name == 'halSim')) {
|
||||
it.sources.each {
|
||||
it.exportedHeaders.srcDirs.each {
|
||||
list.add(it)
|
||||
}
|
||||
}
|
||||
it.binaries.each {
|
||||
it.libs.each {
|
||||
it.includeRoots.each {
|
||||
list.add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
list = list.unique(false)
|
||||
doLast {
|
||||
list.each {
|
||||
print "WPIHEADER: "
|
||||
println it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -202,6 +202,32 @@ model {
|
||||
}
|
||||
}
|
||||
}
|
||||
getHeaders(Task) {
|
||||
def list = []
|
||||
$.components.each {
|
||||
if (it in NativeLibrarySpec && it.name == 'wpilibc') {
|
||||
it.sources.each {
|
||||
it.exportedHeaders.srcDirs.each {
|
||||
list.add(it)
|
||||
}
|
||||
}
|
||||
it.binaries.each {
|
||||
it.libs.each {
|
||||
it.includeRoots.each {
|
||||
list.add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
list = list.unique(false)
|
||||
doLast {
|
||||
list.each {
|
||||
print "WPIHEADER: "
|
||||
println it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -273,6 +273,36 @@ model {
|
||||
it.buildable = false
|
||||
}
|
||||
}
|
||||
tasks {
|
||||
getHeaders(Task) {
|
||||
def list = []
|
||||
$.components.each {
|
||||
if (it in NativeLibrarySpec && it.name == 'wpilibJNIStatic') {
|
||||
it.sources.each {
|
||||
it.exportedHeaders.srcDirs.each {
|
||||
list.add(it)
|
||||
}
|
||||
}
|
||||
it.binaries.each {
|
||||
it.libs.each {
|
||||
it.includeRoots.each {
|
||||
list.add(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// use file to normalize this dir
|
||||
list.add(file("$buildDir/wpilibJNIStatic/jniinclude"))
|
||||
list = list.unique(false)
|
||||
doLast {
|
||||
list.each {
|
||||
print "WPIHEADER: "
|
||||
println it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'publish.gradle'
|
||||
|
||||
Reference in New Issue
Block a user