From ee37e0ea92d07cb343be03d0756cb8800acddff4 Mon Sep 17 00:00:00 2001 From: Daniel Gyoerffy <49782833+Dansoftowner@users.noreply.github.com> Date: Thu, 15 Apr 2021 12:08:30 +0200 Subject: [PATCH] Adding modularity support --- build.gradle | 12 ++++++++++++ src/main/java/module-info.java | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/main/java/module-info.java diff --git a/build.gradle b/build.gradle index 78d85b8..d60ed1d 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,18 @@ repositories { mavenCentral() } +compileJava { + // placing dependencies to the module path + // https://discuss.gradle.org/t/gradle-doesnt-add-modules-to-module-path-during-compile/27382 + + inputs.property("moduleName", "com.jthemedetector") + doFirst { + options.compilerArgs = [ + '--module-path', classpath.asPath, + ] + classpath = files() + } +} dependencies { implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30' diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..16f0a68 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,9 @@ +module com.jthemedetector { + requires com.sun.jna.platform; + requires org.slf4j; + requires jfa; + requires org.jetbrains.annotations; + requires com.sun.jna; + + exports com.jthemedetecor; +} \ No newline at end of file