@Ealrann if I understand correctly, this should be solved by only putting only one “native jar” on the classpath depending on the operating system used. The best way to do that is to make sure the module you depend on provides different variants for different operating systems so that Gradle can automatically select the right one. You can add the variants to libraries with POM metadata using a component metadata rule. In the docs, we even use LWGJ as an example. Maybe you can use that directly.