Reputation: 6057
As soon as I add log4j or logback to my libGDX project, the construo build crashes at createRuntimeImage. It is reproducible with a fresh libGDX project (all default configs) by just adding the log4j dependencies in the lwjgl project.
implementation "org.apache.logging.log4j:log4j-core:2.24.3"
implementation "org.apache.logging.log4j:log4j-api:2.24.3"
Which results in
Execution failed for task ':lwjgl3:createRuntimeImageLinuxX64'.
> Process 'command '/home/user/.jdks/corretto-17.0.13/bin/jdeps'' finished with non-zero exit value 1
Exception in thread "main" java.lang.module.FindException: Module org.apache.logging.log4j not found, required by org.apache.logging.log4j.core
at java.base/java.lang.module.Resolver.findFail(Resolver.java:893)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:192)
at java.base/java.lang.module.Resolver.resolve(Resolver.java:141)
at java.base/java.lang.module.Configuration.resolve(Configuration.java:421)
at java.base/java.lang.module.Configuration.resolve(Configuration.java:255)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration$Builder.build(JdepsConfiguration.java:564)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.buildConfig(JdepsTask.java:603)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:557)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:533)
at jdk.jdeps/com.sun.tools.jdeps.Main.main(Main.java:49)
With logback I get the same results. Tried it with Java 17 and 21 and with gradle 8.5 and 8.11.1. It doesn't matter if I build for Linux, Mac or Windows.
Upvotes: 0
Views: 46