howardpang / androidNativeBundle

a gradle plugin that support publish c/c++ headers to 'aar' and depend those 'aar'

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need to be ableto give filter for header files

igagis opened this issue · comments

Recently there was a pull request which made the plugin only to include .h files to generated AAR package. This is good, but not flexible.

Need to add possibility to set an option in gradle file like includeHeaderFiles which can be set to something like ['*.h', '*.hpp', '*.hxx']. Then the plugin will only add header files which satisfy the given filter.

New version 1.0.5 will include all files in headerDir, if you want you exclude some files set excludeHeaderFiles option, read README for detail

@paulo-raca FYI

I see your approach, but it still has problems this way. Sometimes there are not only .cpp files stored along with headers, but also other files like makefiles or build artifacts from non-android build, etc. And it might be not flexible to add exclude filters for all possible file types there can be.

It would be better to have option includeHeaderFiles.add(**/*.hxx) and only include files which satisfy the filter. But, if filter is not set, then include all files. Is it possible to do it that way?

By the way, readme file has excludeHeaderFiles.add("**/**.cpp"). Is it **/**.cpp or should it be **/*.cpp, is it a typo?

By the way, readme file has excludeHeaderFiles.add("**/**.cpp"). Is it **/**.cpp or should it be **/*.cpp, is it a typo?

the two way is also correct

I have add includeHeaderFilter option as you suggest in new version 1.0.6

It works well now! Thank you for the quick fix!