[Solved] Include a git lib into openfl project.xml?

We are working in a project in different machines and we are using a clone of tilesheetStage3d from github. We are using haxelib to clone the project but when we include to the project just using the name we get a reference to the “git/” folder and not to the “git/src/” folder were the actual code is. Haxe can’t find the classes because we are one step above the first package name. We were using path and copying the path to the folder, but I’m sure there is a cleaner way to do it and less machine dependent.


Usually I just move all the source files up one level. That seems like the most straightforward way to handle it.

If you don’t like that solution, adding "classPath":"src" to haxelib.json may do the trick. (At least, that’s how the “tinkerbell” libraries handle it.)

I believe that Lime looks at the library’s include.xml file (if it exists), so you could add <source path="src" /> there.

1 Like

Thank you! I think the best approach is the last one, using the inlude.xml, that did the trick perfectly.

Just keep in mind that it’ll only work for Lime/OpenFL projects. For pure Haxe projects you’ll need to do something else.

1 Like