Skip to content

Commit eddbb25

Browse files
author
Christian Würthner
committed
Only task to leave projects
1 parent f8c7c0c commit eddbb25

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

gradle-bom/src/main/java/com/iodigital/gradlebom/GradleBomPlugin.kt

+7-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ class GradleBomPlugin : Plugin<Project> {
3030
.distinct()
3131
.sorted()
3232
.forEach { config ->
33-
project.tasks.register(
34-
"generate${config.replaceFirstChar { it.uppercase() }}Bom",
35-
SpecificGenerateModuleBomTask::class.java,
36-
config
37-
)
33+
if (project.subprojects.isEmpty()) {
34+
project.tasks.register(
35+
"generate${config.replaceFirstChar { it.uppercase() }}Bom",
36+
SpecificGenerateModuleBomTask::class.java,
37+
config
38+
)
39+
}
3840
}
3941

4042
subprojects.forEach { sub ->

0 commit comments

Comments
 (0)