From 1e5f48f41375b692a389792b80ba003ef6341d97 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 8 Jul 2024 11:32:27 +0200 Subject: [PATCH] Add module-info.java for all subsystems --- base/src/main/java/module-info.java | 60 +++++++++++++++++++ graphics/build.gradle | 1 + graphics/opengl/build.gradle | 1 + .../opengl/src/main/java/module-info.java | 22 +++++++ graphics/src/main/java/module-info.java | 20 +++++++ graphics/vulkan/build.gradle | 1 + .../vulkan/src/main/java/module-info.java | 18 ++++++ slf4j-compat/build.gradle | 1 + slf4j-compat/src/main/java/module-info.java | 15 +++++ testapp/build.gradle | 1 + testapp/src/main/java/module-info.java | 8 +++ 11 files changed, 148 insertions(+) create mode 100644 base/src/main/java/module-info.java create mode 100644 graphics/opengl/src/main/java/module-info.java create mode 100644 graphics/src/main/java/module-info.java create mode 100644 graphics/vulkan/src/main/java/module-info.java create mode 100644 slf4j-compat/src/main/java/module-info.java create mode 100644 testapp/src/main/java/module-info.java diff --git a/base/src/main/java/module-info.java b/base/src/main/java/module-info.java new file mode 100644 index 00000000..a8b0a9a8 --- /dev/null +++ b/base/src/main/java/module-info.java @@ -0,0 +1,60 @@ +/** + * Defines the core of the StarOpenSource Engine. + * + * @since 1-alpha1 + */ +module sosengine.base { + // Dependencies + requires transitive java.management; + requires transitive static lombok; + requires transitive org.fusesource.jansi; + requires transitive org.jetbrains.annotations; + requires org.reflections; + + // API access + exports de.staropensource.sosengine.base; + exports de.staropensource.sosengine.base.annotations; + exports de.staropensource.sosengine.base.classes; + exports de.staropensource.sosengine.base.classes.events; + exports de.staropensource.sosengine.base.classes.helpers; + exports de.staropensource.sosengine.base.classes.logging; + exports de.staropensource.sosengine.base.data.info; + exports de.staropensource.sosengine.base.data.versioning; + exports de.staropensource.sosengine.base.events; + exports de.staropensource.sosengine.base.exceptions; + exports de.staropensource.sosengine.base.logging; + exports de.staropensource.sosengine.base.logging.implementation; + exports de.staropensource.sosengine.base.types; + exports de.staropensource.sosengine.base.types.dependency; + exports de.staropensource.sosengine.base.types.vectors; + exports de.staropensource.sosengine.base.types.versioning; + exports de.staropensource.sosengine.base.utility; + exports de.staropensource.sosengine.base.utility.converter; + exports de.staropensource.sosengine.base.utility.parser; + exports de.staropensource.sosengine.unittests; + // -> Internal + // These are required for subsystems to function correctly + exports de.staropensource.sosengine.base.internal.events; + + // Reflection access + opens de.staropensource.sosengine.base; + opens de.staropensource.sosengine.base.annotations; + opens de.staropensource.sosengine.base.classes; + opens de.staropensource.sosengine.base.classes.events; + opens de.staropensource.sosengine.base.classes.helpers; + opens de.staropensource.sosengine.base.classes.logging; + opens de.staropensource.sosengine.base.data.info; + opens de.staropensource.sosengine.base.data.versioning; + opens de.staropensource.sosengine.base.events; + opens de.staropensource.sosengine.base.exceptions; + opens de.staropensource.sosengine.base.logging; + opens de.staropensource.sosengine.base.logging.implementation; + opens de.staropensource.sosengine.base.types; + opens de.staropensource.sosengine.base.types.dependency; + opens de.staropensource.sosengine.base.types.vectors; + opens de.staropensource.sosengine.base.types.versioning; + opens de.staropensource.sosengine.base.utility; + opens de.staropensource.sosengine.base.utility.converter; + opens de.staropensource.sosengine.base.utility.parser; + opens de.staropensource.sosengine.unittests; +} diff --git a/graphics/build.gradle b/graphics/build.gradle index 587a0886..a90de793 100644 --- a/graphics/build.gradle +++ b/graphics/build.gradle @@ -45,6 +45,7 @@ dependencies { // -> Project <- implementation project(":base") + implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why } javadoc.options { diff --git a/graphics/opengl/build.gradle b/graphics/opengl/build.gradle index b772436e..00e730f4 100644 --- a/graphics/opengl/build.gradle +++ b/graphics/opengl/build.gradle @@ -95,6 +95,7 @@ dependencies { // -> Project <- implementation project(":base") implementation project(":graphics") + implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why } javadoc.options { diff --git a/graphics/opengl/src/main/java/module-info.java b/graphics/opengl/src/main/java/module-info.java new file mode 100644 index 00000000..78961f64 --- /dev/null +++ b/graphics/opengl/src/main/java/module-info.java @@ -0,0 +1,22 @@ +module sosengine.opengl { + // Dependencies + // -> Subsystems + requires transitive sosengine.base; + requires transitive sosengine.graphics; + // -> Libraries + requires transitive static lombok; + requires transitive org.jetbrains.annotations; + requires transitive org.lwjgl; + requires transitive org.lwjgl.glfw; + requires transitive org.lwjgl.opengl; + + // API access + exports de.staropensource.sosengine.graphics.opengl; + exports de.staropensource.sosengine.graphics.opengl.classes; + exports de.staropensource.sosengine.graphics.opengl.events; + + // Reflection access + opens de.staropensource.sosengine.graphics.opengl; + opens de.staropensource.sosengine.graphics.opengl.classes; + opens de.staropensource.sosengine.graphics.opengl.events; +} diff --git a/graphics/src/main/java/module-info.java b/graphics/src/main/java/module-info.java new file mode 100644 index 00000000..0da3c805 --- /dev/null +++ b/graphics/src/main/java/module-info.java @@ -0,0 +1,20 @@ +module sosengine.graphics { + // Dependencies + // -> Subsystems + requires transitive sosengine.base; + // -> Libraries + requires transitive static lombok; + requires transitive org.jetbrains.annotations; + + // API access + exports de.staropensource.sosengine.graphics; + exports de.staropensource.sosengine.graphics.classes; + exports de.staropensource.sosengine.graphics.events; + exports de.staropensource.sosengine.graphics.types; + + // Reflection access + opens de.staropensource.sosengine.graphics; + opens de.staropensource.sosengine.graphics.classes; + opens de.staropensource.sosengine.graphics.events; + opens de.staropensource.sosengine.graphics.types; +} diff --git a/graphics/vulkan/build.gradle b/graphics/vulkan/build.gradle index 76301e3e..2db3d8ed 100644 --- a/graphics/vulkan/build.gradle +++ b/graphics/vulkan/build.gradle @@ -92,6 +92,7 @@ dependencies { // -> Project <- implementation project(":base") implementation project(":graphics") + implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why } javadoc.options { diff --git a/graphics/vulkan/src/main/java/module-info.java b/graphics/vulkan/src/main/java/module-info.java new file mode 100644 index 00000000..5d6674f1 --- /dev/null +++ b/graphics/vulkan/src/main/java/module-info.java @@ -0,0 +1,18 @@ +module sosengine.vulkan { + // Dependencies + // -> Subsystems + requires transitive sosengine.base; + requires transitive sosengine.graphics; + // -> Libraries + requires transitive static lombok; + requires transitive org.jetbrains.annotations; + requires transitive org.lwjgl.glfw; + + // API access + exports de.staropensource.sosengine.graphics.vulkan; + exports de.staropensource.sosengine.graphics.vulkan.events; + + // Reflection access + opens de.staropensource.sosengine.graphics.vulkan; + opens de.staropensource.sosengine.graphics.vulkan.events; +} diff --git a/slf4j-compat/build.gradle b/slf4j-compat/build.gradle index 6a5fd697..47886750 100644 --- a/slf4j-compat/build.gradle +++ b/slf4j-compat/build.gradle @@ -37,6 +37,7 @@ dependencies { // -> Project <- implementation project(":base") + implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why } javadoc.options { diff --git a/slf4j-compat/src/main/java/module-info.java b/slf4j-compat/src/main/java/module-info.java new file mode 100644 index 00000000..a40c7c25 --- /dev/null +++ b/slf4j-compat/src/main/java/module-info.java @@ -0,0 +1,15 @@ +module sosengine.slf4j_compat { + // Dependencies + // -> Subsystems + requires transitive sosengine.base; + // -> Libraries + requires transitive static lombok; + requires transitive org.jetbrains.annotations; + requires transitive org.slf4j; + + // API access + exports de.staropensource.sosengine.slf4j_compat; + + // Reflection access + opens de.staropensource.sosengine.slf4j_compat; +} diff --git a/testapp/build.gradle b/testapp/build.gradle index 0166d19c..d0f94ae3 100644 --- a/testapp/build.gradle +++ b/testapp/build.gradle @@ -39,6 +39,7 @@ dependencies { implementation project(":graphics") implementation project(":graphics:vulkan") implementation project(":graphics:opengl") + implementation 'org.fusesource.jansi:jansi:' + project.dependencyJansi // for some reason required or the build fails don't ask me why } javadoc.options { diff --git a/testapp/src/main/java/module-info.java b/testapp/src/main/java/module-info.java new file mode 100644 index 00000000..f45f6724 --- /dev/null +++ b/testapp/src/main/java/module-info.java @@ -0,0 +1,8 @@ +open module sosengine.testapp { + // Dependencies + // -> Subsystems + requires sosengine.base; + requires sosengine.graphics; + // -> Libraries + requires static lombok; +}