File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
gradle-conventions/conventions-utils/src/main/kotlin/util Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,19 @@ package util
66
77import org.gradle.api.Project
88
9- fun Project.configureMetaTasks (vararg taskNames : String ) {
10- configureMetaTasks(taskNames.toList())
9+ fun Project.configureMetaTasks (vararg taskNames : String , excludeSubprojects : List < String > = emptyList() ) {
10+ configureMetaTasks(taskNames.toList(), excludeSubprojects )
1111}
1212
13- fun Project.configureMetaTasks (taskNames : List <String >) {
13+ fun Project.configureMetaTasks (taskNames : List <String >, excludeSubprojects : List < String > = emptyList() ) {
1414 val root = this
1515 val metaSet = taskNames.toSet()
1616
1717 subprojects.forEach {
18+ if (it.name in excludeSubprojects) {
19+ return @forEach
20+ }
21+
1822 it.tasks.all {
1923 val subtask = this
2024
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ configureMetaTasks(
4646 " publishPlugins" , // publish to Gradle Plugin Portal
4747 " publishToMavenLocal" , // for local plugin development
4848 " validatePlugins" , // plugin validation
49+ excludeSubprojects = listOf (" gradle-plugin-api" ),
50+ )
51+
52+ configureMetaTasks(
4953 " detekt" , // run Detekt tasks
5054 " clean" ,
5155)
You can’t perform that action at this time.
0 commit comments