From 5e6080da78a1d1cce108bb272159fbd55bb1ebf7 Mon Sep 17 00:00:00 2001 From: Ran <43445785+RanCraftPlayz@users.noreply.github.com> Date: Fri, 12 Aug 2022 11:08:31 +0600 Subject: [PATCH] module-info.java --- build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index 29f491da3..43e96fdf3 100644 --- a/build.gradle +++ b/build.gradle @@ -229,6 +229,20 @@ subprojects { p -> } } + // Tells gradle where to look for other modules + // Why isn't the classpath added to the modules path by default? + if (p == project(":core")) { + compileJava { + inputs.property('moduleName', 'dhApi') + doFirst { + options.compilerArgs = [ + '--module-path', classpath.asPath + ] + classpath = files() + } + } + } + // Run mergeJars when running build build.finalizedBy(mergeJars) assemble.finalizedBy(mergeJars)