Include files with no extension in cppHeaders Zip task

native

(Shahji) #1

How would I include files with no extension in cppHeaders Zip task. The suggested approach to include files not enforced by gradle API works for files with extension but not without extension. So, to include inl and hpp the following code works.

cppHeaders.include '**/*.inl'
cppHeaders.include '**/*.hpp'

I tried the following but neither of them seem to pull in the files with no extension.

cppHeaders.include '**/'
cppHeaders.include '**/*'
cppHeaders.include '**/*.*'

Any suggestions?


(Daniel Lacasse) #2

You partly got it right @Shahji. The pattern **/* is right, unfortunately, due to how the cppHeaders task is configured, adding include pattern at the root level of the task won’t change the outcome. Instead, you need to add something like this:

cppHeaders {
    from("src/main/public") {
        include "**/*"
    }
}

I’m surprised your other pattern worked as they should have to work the same way.


(Shahji) #3

That worked. Thanks @Daniel_L