From 6e5d676643b444b0c9bb985e6d9dfdfad94824fc Mon Sep 17 00:00:00 2001 From: NebelNidas Date: Wed, 19 Apr 2023 23:54:40 +0200 Subject: [PATCH] Un-"modularize" Matcher (remove JPMS) --- build.gradle | 29 ++++++++++------------------- gradle.properties | 1 - settings.gradle | 1 - src/main/java/module-info.java | 31 ------------------------------- 4 files changed, 10 insertions(+), 52 deletions(-) delete mode 100644 src/main/java/module-info.java diff --git a/build.gradle b/build.gradle index e74c8882..037bd18f 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,6 @@ plugins { id "checkstyle" id 'org.openjfx.javafxplugin' id 'com.github.johnrengelman.shadow' - id 'org.gradlex.extra-java-module-info' } repositories { @@ -39,11 +38,6 @@ java { withSourcesJar() } -tasks.withType(JavaCompile).configureEach { - it.options.encoding = "UTF-8" - it.options.release = 17 -} - javafx { version = javafx_version modules = [ 'javafx.controls', 'javafx.web' ] @@ -83,22 +77,19 @@ dependencies { runtimeOnly "org.openjfx:javafx-media:${javafx_version}:linux" } -extraJavaModuleInfo { - failOnMissingModuleInfo.set(false) // because of transitive dependencies - - // CFR - automaticModule("net.fabricmc:cfr", "cfr") - - // Vineflower - automaticModule("org.vineflower:vineflower", "org.vineflower.vineflower") +application { + mainClass = 'matcher.Main' +} - // Procyon - automaticModule("org.bitbucket.mstrobel:procyon-compilertools", "procyon.compilertools") +tasks.withType(JavaCompile).configureEach { + it.options.encoding = "UTF-8" + it.options.release = 17 } -application { - mainModule = 'matcher' - mainClass = 'matcher.Main' +jar { + manifest { + attributes 'Automatic-Module-Name': 'matcher' + } } publishing { diff --git a/gradle.properties b/gradle.properties index 2c775d7f..1f950ca0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,6 @@ org.gradle.jvmargs=-Xmx2G # Gradle Plugins javafx_plugin_version = 0.1.0 shadow_version = 7.1.2 -extra_java_module_info_version = 1.6 # Poject Properties version = 0.1.0 diff --git a/settings.gradle b/settings.gradle index 797324ea..6e24704a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,7 +6,6 @@ pluginManagement { plugins { id 'org.openjfx.javafxplugin' version "${javafx_plugin_version}" id 'com.github.johnrengelman.shadow' version "${shadow_version}" - id 'org.gradlex.extra-java-module-info' version "${extra_java_module_info_version}" } } diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java deleted file mode 100644 index d6a200d7..00000000 --- a/src/main/java/module-info.java +++ /dev/null @@ -1,31 +0,0 @@ -module matcher { - exports matcher.config; - exports matcher.srcprocess; - exports matcher.gui; - exports matcher.gui.tab; - exports matcher.type; - exports matcher.gui.menu; - exports matcher.mapping; - exports matcher.classifier; - exports matcher; - exports matcher.bcremap; - exports matcher.serdes; - - requires cfr; - requires com.github.javaparser.core; - requires org.vineflower.vineflower; - requires java.prefs; - requires transitive javafx.base; - requires transitive javafx.controls; - requires transitive javafx.graphics; - requires transitive javafx.web; - requires transitive org.objectweb.asm; - requires transitive org.objectweb.asm.tree; - requires org.objectweb.asm.commons; - requires org.objectweb.asm.tree.analysis; - requires org.objectweb.asm.util; - requires procyon.compilertools; - requires transitive net.fabricmc.mappingio; - - uses matcher.Plugin; -}