From 079400796a92270c85e02563617294bed267f17a Mon Sep 17 00:00:00 2001 From: Alexander Likhachev Date: Mon, 11 Apr 2022 23:27:57 +0300 Subject: [PATCH] [Build] Validate Gradle plugins on `install` --- build.gradle.kts | 2 +- .../kotlin/gradle-plugin-common-configuration.gradle.kts | 6 ++++++ libraries/tools/kotlin-gradle-plugin/build.gradle.kts | 4 ---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index fae9132f364..783e1b8e8d4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -841,7 +841,7 @@ tasks { register("examplesTest") { dependsOn("dist") - (project(":examples").subprojects + project(":kotlin-gradle-subplugin-example")).forEach { p -> + project(":examples").subprojects.forEach { p -> dependsOn("${p.path}:check") } } diff --git a/buildSrc/src/main/kotlin/gradle-plugin-common-configuration.gradle.kts b/buildSrc/src/main/kotlin/gradle-plugin-common-configuration.gradle.kts index a69caa617b6..4e204266f96 100644 --- a/buildSrc/src/main/kotlin/gradle-plugin-common-configuration.gradle.kts +++ b/buildSrc/src/main/kotlin/gradle-plugin-common-configuration.gradle.kts @@ -37,6 +37,12 @@ publishing { } } +tasks { + named("install") { + dependsOn(named("validatePlugins")) + } +} + val commonSourceSet = createGradleCommonSourceSet() reconfigureMainSourcesSetForGradlePlugin(commonSourceSet) publishShadowedJar(sourceSets[SourceSet.MAIN_SOURCE_SET_NAME], commonSourceSet) diff --git a/libraries/tools/kotlin-gradle-plugin/build.gradle.kts b/libraries/tools/kotlin-gradle-plugin/build.gradle.kts index d3c348824db..e636f1786fa 100644 --- a/libraries/tools/kotlin-gradle-plugin/build.gradle.kts +++ b/libraries/tools/kotlin-gradle-plugin/build.gradle.kts @@ -128,10 +128,6 @@ tasks { enableStricterValidation.set(true) } - named("install") { - dependsOn(named("validatePlugins")) - } - withType().configureEach { dokkaSourceSets.configureEach { includes.from("Module.md")