7171 * - Define dependencies and dependency constraints by Module Name
7272 * using {@link #ga(String)}, {@link #gav(String, String)} or {@link #gav(String)}
7373 */
74- @ SuppressWarnings ("unused" )
7574public abstract class JavaModuleDependenciesExtension {
7675 static final String JAVA_MODULE_DEPENDENCIES = "javaModuleDependencies" ;
7776 private static final String INTERNAL = "internal" ;
@@ -214,13 +213,13 @@ private String toProjectName(String moduleNameSuffix) {
214213
215214 public Provider <Dependency > create (String moduleName , SourceSet sourceSetWithModuleInfo ) {
216215 if (getModuleInfoCache ().get ().isInitializedInSettings ()) {
217- return createPrecise (moduleName , sourceSetWithModuleInfo );
216+ return createPrecise (moduleName );
218217 } else {
219218 return createWithGuessing (moduleName , sourceSetWithModuleInfo );
220219 }
221220 }
222221
223- private Provider <Dependency > createPrecise (String moduleName , SourceSet sourceSetWithModuleInfo ) {
222+ private Provider <Dependency > createPrecise (String moduleName ) {
224223 return getProviders ().provider (() -> {
225224 String projectPath = getModuleInfoCache ().get ().getProjectPath (moduleName );
226225 String capability = getModuleInfoCache ().get ().getCapability (moduleName );
@@ -314,6 +313,7 @@ private ModuleDependency createExternalDependency(String moduleName) {
314313 * @param version The (required) version
315314 * @return Dependency notation
316315 */
316+ @ SuppressWarnings ("unused" )
317317 public Provider <String > gav (String moduleName , String version ) {
318318 return ga (moduleName ).map (s -> s + ":" + version );
319319 }
@@ -326,6 +326,7 @@ public Provider<String> gav(String moduleName, String version) {
326326 * @param version The (required) version
327327 * @return Dependency notation
328328 */
329+ @ SuppressWarnings ("unused" )
329330 public Provider <String > gav (Provider <String > moduleName , Provider <String > version ) {
330331 return ga (moduleName ).map (s -> s + ":" + version .get ());
331332 }
@@ -339,6 +340,7 @@ public Provider<String> gav(Provider<String> moduleName, Provider<String> versio
339340 * @param moduleName The Module Name
340341 * @return Dependency notation
341342 */
343+ @ SuppressWarnings ("unused" )
342344 public Provider <Map <String , Object >> gav (String moduleName ) {
343345 return ga (moduleName ).map (ga -> findGav (ga , moduleName ));
344346 }
@@ -352,6 +354,7 @@ public Provider<Map<String, Object>> gav(String moduleName) {
352354 * @param moduleName The Module Name
353355 * @return Dependency notation
354356 */
357+ @ SuppressWarnings ("unused" )
355358 public Provider <Map <String , Object >> gav (Provider <String > moduleName ) {
356359 return ga (moduleName ).map (ga -> findGav (ga , moduleName .get ()));
357360 }
@@ -506,6 +509,7 @@ private Dependency createDependency(String project) {
506509 * @param sourceSetForModuleInfo The source set that contains the module-info.java (e.g. 'main')
507510 * @param sourceSetForClasspath The source set that contains the code that is compiled (e.g. 'test')
508511 */
512+ @ SuppressWarnings ("unused" )
509513 public void addRequiresRuntimeSupport (SourceSet sourceSetForModuleInfo , SourceSet sourceSetForClasspath ) {
510514 doAddRequiresRuntimeSupport (sourceSetForModuleInfo , sourceSetForClasspath );
511515 }
@@ -547,13 +551,6 @@ private <T> Provider<T> errorIfNotFound(Provider<String> moduleName) {
547551 });
548552 }
549553
550- private String moduleDebugInfo (String moduleName , File moduleInfoFile , File rootDir ) {
551- return moduleName
552- + " (required in "
553- + moduleInfoFile .getAbsolutePath ().substring (rootDir .getAbsolutePath ().length () + 1 )
554- + ")" ;
555- }
556-
557554 @ Inject
558555 protected abstract Project getProject ();
559556
0 commit comments