Add test tag and task for KGP Android tests.
^KT-45747 In Progress
This commit is contained in:
@@ -258,9 +258,21 @@ val mppTestsTask = tasks.register<Test>("kgpMppTests") {
|
||||
if (isTeamcityBuild) finalizedBy(cleanTestKitCacheTask)
|
||||
}
|
||||
|
||||
val androidTestsTask = tasks.register<Test>("kgpAndroidTests") {
|
||||
group = KGP_TEST_TASKS_GROUP
|
||||
description = "Run Android Kotlin Gradle plugin tests"
|
||||
maxParallelForks = maxParallelTestForks
|
||||
useJUnitPlatform {
|
||||
includeTags("AndroidKGP")
|
||||
includeEngines("junit-jupiter")
|
||||
}
|
||||
|
||||
if (isTeamcityBuild) finalizedBy(cleanTestKitCacheTask)
|
||||
}
|
||||
|
||||
tasks.named<Task>("check") {
|
||||
dependsOn("testAdvanceGradleVersion")
|
||||
dependsOn(simpleTestsTask, jvmTestsTask, jsTestsTask, daemonsTestsTask, otherPluginsTestTask, mppTestsTask)
|
||||
dependsOn(simpleTestsTask, jvmTestsTask, jsTestsTask, daemonsTestsTask, otherPluginsTestTask, mppTestsTask, androidTestsTask)
|
||||
if (isTeamcityBuild) {
|
||||
dependsOn("testAdvanceGradleVersionMppAndAndroid")
|
||||
dependsOn("testMppAndAndroid")
|
||||
@@ -314,7 +326,8 @@ tasks.withType<Test> {
|
||||
jsTestsTask.name,
|
||||
daemonsTestsTask.name,
|
||||
otherPluginsTestTask.name,
|
||||
mppTestsTask.name
|
||||
mppTestsTask.name,
|
||||
androidTestsTask.name
|
||||
)
|
||||
if (shouldApplyJunitPlatform) {
|
||||
maxHeapSize = "512m"
|
||||
|
||||
+13
@@ -47,6 +47,19 @@ annotation class JsGradlePluginTests
|
||||
@Tag("MppKGP")
|
||||
annotation class MppGradlePluginTests
|
||||
|
||||
/**
|
||||
* Add it to the tests covering Kotlin Android Gradle plugin.
|
||||
*/
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.FUNCTION)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@Tag("AndroidKGP")
|
||||
annotation class AndroidGradlePluginTests
|
||||
|
||||
/**
|
||||
* Add it the tests that are not covered by tags above.
|
||||
*
|
||||
* Usually it would be tests for kapt, serialization plugins, etc...
|
||||
*/
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.FUNCTION)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
@Tag("OtherKGP")
|
||||
|
||||
Reference in New Issue
Block a user