Skip to content

Commit

Permalink
Merge pull request #11374 from antonwiens/feature/missing-main-sourceSet
Browse files Browse the repository at this point in the history
Ignore modules with missing main source set
  • Loading branch information
aloubyansky authored Aug 17, 2020
2 parents bdcb548 + ba170ce commit f24f506
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Set<WorkspaceModule> getWorkspace(Project project, LaunchMode mode) {
for (Project subproject : project.getAllprojects()) {
final Convention convention = subproject.getConvention();
JavaPluginConvention javaConvention = convention.findPlugin(JavaPluginConvention.class);
if (javaConvention == null) {
if (javaConvention == null || !javaConvention.getSourceSets().getNames().contains(SourceSet.MAIN_SOURCE_SET_NAME)) {
continue;
}
modules.add(getWorkspaceModule(subproject, mode));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
id 'java-library'
}


sourceSets {
remove(named("main"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ pluginManagement {
}
rootProject.name='mutli-module-project'

include 'common', 'application'
include 'common', 'application', 'nomain'

0 comments on commit f24f506

Please sign in to comment.