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
6
6
7
7
import org.gradle.api.Project
8
8
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 )
11
11
}
12
12
13
- fun Project.configureMetaTasks (taskNames : List <String >) {
13
+ fun Project.configureMetaTasks (taskNames : List <String >, excludeSubprojects : List < String > = emptyList() ) {
14
14
val root = this
15
15
val metaSet = taskNames.toSet()
16
16
17
17
subprojects.forEach {
18
+ if (it.name in excludeSubprojects) {
19
+ return @forEach
20
+ }
21
+
18
22
it.tasks.all {
19
23
val subtask = this
20
24
Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ configureMetaTasks(
46
46
" publishPlugins" , // publish to Gradle Plugin Portal
47
47
" publishToMavenLocal" , // for local plugin development
48
48
" validatePlugins" , // plugin validation
49
+ excludeSubprojects = listOf (" gradle-plugin-api" ),
50
+ )
51
+
52
+ configureMetaTasks(
49
53
" detekt" , // run Detekt tasks
50
54
" clean" ,
51
55
)
You can’t perform that action at this time.
0 commit comments