Skip to content

Commit

Permalink
Adding modularity support
Browse files Browse the repository at this point in the history
  • Loading branch information
Dansoftowner committed Apr 15, 2021
1 parent 1a32942 commit ee37e0e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit ee37e0e

Please # to comment.