Hello all!
I've translated a rather large java project of mine into Obj-c with the help of J2ObjC. Since changes to the project itself are infrequent, I've build a Make build chain which will result in a folder for the translated project.
Afterwards I included the translated files into my Swift project and added the necessary header files to my bridging header. Everything works splendidly!
Because of the size of the translated project, wanted to add a separate target which build and exports a framework which I can then integrate into my swift project. For a smaller translated library this works great, once making sure to supplement j2objc in the form of the provided xcframework.
Now the issue comes with my larger framework and its many dependencies that require to be build with many package directories due to many files having the same names, especially in my dependencies.
In the target (framework), i've included all header files which I had previously imported in my bridging header of my swift project and made them public in the "build phases" tab of xcode. The framework target itself builds just fine, but trouble arises when my swift project wants to build the "module" created by the framework.
It will find the header files that are made public but since they usually import further header files specified by a path such as "com/jts/SomeHeader.h", they're not found by my swift project anymore.
Now I could make the many dependent files public as well, but xcode will dump them all into a single header folder for the exported module, thus some files will clash with others that share the same name.
Does anyone have any solution to my problem?
What I already investigated:
1) Defining seperate module maps => Didn't really work out
2) Defining prefixes for packages and removing package directories with the use of J2ObjC flags. Sadly the functionality to include those prefixes into the filename as well has been put on hold a few years ago. Any updates perhaps?
3) Renaming my Java files isn't really an option I think, largely due to the fact most redundancies are inside dependencies.