howardpang / androidNativeBundle

a gradle plugin that support publish c/c++ headers to 'aar' and depend those 'aar'
Apache License 2.0
71 stars 14 forks source link

allow specifying destination subdirectory path for header files #7

Open igagis opened 4 years ago

igagis commented 4 years ago

For example, in my mylib project I have header files in the

root/include

and I want when the ARR package is built the headers would go to

jni/include/my/lib

so in gradle file I could specify it by adding headerOutSubdir = "my/lib" like this:

nativeBundleExport {
        headerDir = "${project.projectDir}/root/include/"
        bundleStatic = true
        includeHeaderFilter.add("**/*.h")
        headerOutSubdir = "my/lib"
    }

Just to add, this is needed when there is no possibility to place the header files into root/include/my/lib in the project tree in the first place, e.g. when packaging a third party library it is undesirable to change its directory layout.

howardpang commented 4 years ago

Thanks for your advice, i will take consideration it