Fix Gradle plugin inputs validation issue

Also add '@Internal' annotation in interface, so it propagated to all
inheritors.

^KT-52448 Fixed
This commit is contained in:
Yahor Berdnikau
2022-06-03 14:16:35 +02:00
parent 4700ad3e9e
commit 021e251143
2 changed files with 23 additions and 0 deletions
@@ -43,6 +43,12 @@ interface KotlinCompileTool : PatternFilterable, Task {
@get:OutputDirectory
val destinationDirectory: DirectoryProperty
@Internal
override fun getExcludes(): MutableSet<String>
@Internal
override fun getIncludes(): MutableSet<String>
}
interface BaseKotlinCompile : KotlinCompileTool {
@@ -226,4 +226,21 @@ class SimpleKotlinGradleIT : KGPBaseTest() {
}
}
}
@DisplayName("Validate Gradle plugins inputs")
@GradleTestVersions(minVersion = TestVersions.Gradle.MAX_SUPPORTED) // Always should use only latest Gradle version
@GradleTest
internal fun validatePluginInputs(gradleVersion: GradleVersion) {
project("kotlinProject", gradleVersion) {
buildGradle.modify {
"""
plugins {
id "validate-external-gradle-plugin"
${it.substringAfter("plugins {")}
""".trimIndent()
}
build("validateExternalPlugins")
}
}
}