File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/org/sonarqube/gradle Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,17 @@ private static List<File> registerAndConfigureResolverTasks(Project topLevelProj
120120 if (sourceSets == null ) {
121121 return null ;
122122 }
123- return sourceSets .getByName (SourceSet .MAIN_SOURCE_SET_NAME ).getCompileClasspath ();
123+ var set = sourceSets .findByName (SourceSet .MAIN_SOURCE_SET_NAME );
124+ return set == null ? null : set .getCompileClasspath ();
124125 });
125126 task .setCompileClasspath (compile );
126127 Provider <FileCollection > test = target .provider (() -> {
127128 var sourceSets = SonarUtils .getSourceSets (target );
128129 if (sourceSets == null ) {
129130 return null ;
130131 }
131- return sourceSets .getByName (SourceSet .TEST_SOURCE_SET_NAME ).getCompileClasspath ();
132+ var set = sourceSets .findByName (SourceSet .TEST_SOURCE_SET_NAME );
133+ return set == null ? null : set .getCompileClasspath ();
132134 });
133135 task .setTestCompileClasspath (test );
134136
You can’t perform that action at this time.
0 commit comments