diff --git a/build.gradle b/build.gradle index bc035a016..75b811836 100644 --- a/build.gradle +++ b/build.gradle @@ -157,6 +157,7 @@ sourceSets { ext.languageVersion = 16 ext.modularityExcluded = true // don't add ourselves } + modularityDummy {} } // Because Mixin aims to support a variety of environments, we have to be able to run with older versions of GSON and Guava that lack official module @@ -364,7 +365,7 @@ if (JavaVersion.current().isJava8Compatible()) { } task stagingJar(type: ShadowJar) { - sourceSets.findAll { !(it.name =~ /example|test/) }.each { + sourceSets.findAll { !(it.name =~ /example|test|modularityDummy/) }.each { from it.output } configurations = [project.configurations.stagingJar] diff --git a/src/modularity/java/module-info.java b/src/modularity/java/module-info.java index 82425fe68..491c37bcb 100644 --- a/src/modularity/java/module-info.java +++ b/src/modularity/java/module-info.java @@ -152,4 +152,6 @@ provides org.spongepowered.tools.obfuscation.service.IObfuscationService with org.spongepowered.tools.obfuscation.mcp.ObfuscationServiceMCP, org.spongepowered.tools.obfuscation.fg3.ObfuscationServiceFG3; + + uses org.spongepowered.include.com.google.common.base.PatternCompiler; } diff --git a/src/modularityDummy/java/org/spongepowered/include/com/google/common/base/PatternCompiler.java b/src/modularityDummy/java/org/spongepowered/include/com/google/common/base/PatternCompiler.java new file mode 100644 index 000000000..cec3e17f3 --- /dev/null +++ b/src/modularityDummy/java/org/spongepowered/include/com/google/common/base/PatternCompiler.java @@ -0,0 +1,5 @@ +package org.spongepowered.include.com.google.common.base; + +// Dummy public class so that the module can declare a uses directive for it +public interface PatternCompiler { +}