Hello guys,
I have a classpath folder structure that looks like this:
src
├── client
├── server
└── shared
And I’m trying to create a client.hxml
, which only compiles classes in the client
and shared
folders.
# This I'm assuming is necessary so that packages can be located
# with their full package names
-cp src
--macro include("", true, ["server*"], ["src"])
However building this, it would appear as if the ignore
parameter of include()
has no effect.
I tested it by making a class in client
use a class from the server
package, and the whole thing compiled without errors with the server class ending up in the output file. I do not want this to be possible.
Changing it to this:
--macro include("", true, [""], ["src/client", "src/shared"])
Gives an error similar to:
(unknown): Type not found SomeClassInClient
Which I’m assuming happens because it can no longer resolve package client.foo.bar
since its top-level is now the src/client
folder?
So how should I go about doing this? Is there some better practice to achieve a similar project structure that I’m not following?
Some more information in case it’s relevant:
- The target is
lua
. - There is no main,
client
is a library.