File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/main/java/org/gradlex/javamodule/moduleinfo Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public class ModuleInfo extends ModuleSpec {
2727 final Set <String > requiresStaticTransitive = new LinkedHashSet <>();
2828 final Map <String , Set <String >> ignoreServiceProviders = new LinkedHashMap <>();
2929 final Set <String > uses = new LinkedHashSet <>();
30+ final Map <String , Set <String >> providers = new LinkedHashMap <>();
3031
3132 boolean exportAllPackages ;
3233 boolean requireAllDefinedDependencies ;
@@ -92,6 +93,22 @@ public void requiresStaticTransitive(String requiresStaticTransitive) {
9293 addOrThrow (this .requiresStaticTransitive , requiresStaticTransitive );
9394 }
9495
96+ /**
97+ * @param provides corresponds to the directive in a 'module-info.java' file
98+ * @param with specifys the package(s) containing provided service classes
99+ */
100+ public void provides (String provides , String ... with ) {
101+ addOrThrow (this .providers , provides , with );
102+ }
103+
104+ /**
105+ * Getter for the providers map (needed for the transformation logic)
106+ * @return
107+ */
108+ public Map <String , Set <String >> getProviders () {
109+ return providers ;
110+ }
111+
95112 /**
96113 * @param uses corresponds to the directive in a 'module-info.java' file
97114 */
You can’t perform that action at this time.
0 commit comments