71
71
* - Define dependencies and dependency constraints by Module Name
72
72
* using {@link #ga(String)}, {@link #gav(String, String)} or {@link #gav(String)}
73
73
*/
74
- @ SuppressWarnings ("unused" )
75
74
public abstract class JavaModuleDependenciesExtension {
76
75
static final String JAVA_MODULE_DEPENDENCIES = "javaModuleDependencies" ;
77
76
private static final String INTERNAL = "internal" ;
@@ -214,13 +213,13 @@ private String toProjectName(String moduleNameSuffix) {
214
213
215
214
public Provider <Dependency > create (String moduleName , SourceSet sourceSetWithModuleInfo ) {
216
215
if (getModuleInfoCache ().get ().isInitializedInSettings ()) {
217
- return createPrecise (moduleName , sourceSetWithModuleInfo );
216
+ return createPrecise (moduleName );
218
217
} else {
219
218
return createWithGuessing (moduleName , sourceSetWithModuleInfo );
220
219
}
221
220
}
222
221
223
- private Provider <Dependency > createPrecise (String moduleName , SourceSet sourceSetWithModuleInfo ) {
222
+ private Provider <Dependency > createPrecise (String moduleName ) {
224
223
return getProviders ().provider (() -> {
225
224
String projectPath = getModuleInfoCache ().get ().getProjectPath (moduleName );
226
225
String capability = getModuleInfoCache ().get ().getCapability (moduleName );
@@ -314,6 +313,7 @@ private ModuleDependency createExternalDependency(String moduleName) {
314
313
* @param version The (required) version
315
314
* @return Dependency notation
316
315
*/
316
+ @ SuppressWarnings ("unused" )
317
317
public Provider <String > gav (String moduleName , String version ) {
318
318
return ga (moduleName ).map (s -> s + ":" + version );
319
319
}
@@ -326,6 +326,7 @@ public Provider<String> gav(String moduleName, String version) {
326
326
* @param version The (required) version
327
327
* @return Dependency notation
328
328
*/
329
+ @ SuppressWarnings ("unused" )
329
330
public Provider <String > gav (Provider <String > moduleName , Provider <String > version ) {
330
331
return ga (moduleName ).map (s -> s + ":" + version .get ());
331
332
}
@@ -339,6 +340,7 @@ public Provider<String> gav(Provider<String> moduleName, Provider<String> versio
339
340
* @param moduleName The Module Name
340
341
* @return Dependency notation
341
342
*/
343
+ @ SuppressWarnings ("unused" )
342
344
public Provider <Map <String , Object >> gav (String moduleName ) {
343
345
return ga (moduleName ).map (ga -> findGav (ga , moduleName ));
344
346
}
@@ -352,6 +354,7 @@ public Provider<Map<String, Object>> gav(String moduleName) {
352
354
* @param moduleName The Module Name
353
355
* @return Dependency notation
354
356
*/
357
+ @ SuppressWarnings ("unused" )
355
358
public Provider <Map <String , Object >> gav (Provider <String > moduleName ) {
356
359
return ga (moduleName ).map (ga -> findGav (ga , moduleName .get ()));
357
360
}
@@ -506,6 +509,7 @@ private Dependency createDependency(String project) {
506
509
* @param sourceSetForModuleInfo The source set that contains the module-info.java (e.g. 'main')
507
510
* @param sourceSetForClasspath The source set that contains the code that is compiled (e.g. 'test')
508
511
*/
512
+ @ SuppressWarnings ("unused" )
509
513
public void addRequiresRuntimeSupport (SourceSet sourceSetForModuleInfo , SourceSet sourceSetForClasspath ) {
510
514
doAddRequiresRuntimeSupport (sourceSetForModuleInfo , sourceSetForClasspath );
511
515
}
@@ -547,13 +551,6 @@ private <T> Provider<T> errorIfNotFound(Provider<String> moduleName) {
547
551
});
548
552
}
549
553
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
-
557
554
@ Inject
558
555
protected abstract Project getProject ();
559
556
0 commit comments