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)
|
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") {
|
tasks.named<Task>("check") {
|
||||||
dependsOn("testAdvanceGradleVersion")
|
dependsOn("testAdvanceGradleVersion")
|
||||||
dependsOn(simpleTestsTask, jvmTestsTask, jsTestsTask, daemonsTestsTask, otherPluginsTestTask, mppTestsTask)
|
dependsOn(simpleTestsTask, jvmTestsTask, jsTestsTask, daemonsTestsTask, otherPluginsTestTask, mppTestsTask, androidTestsTask)
|
||||||
if (isTeamcityBuild) {
|
if (isTeamcityBuild) {
|
||||||
dependsOn("testAdvanceGradleVersionMppAndAndroid")
|
dependsOn("testAdvanceGradleVersionMppAndAndroid")
|
||||||
dependsOn("testMppAndAndroid")
|
dependsOn("testMppAndAndroid")
|
||||||
@@ -314,7 +326,8 @@ tasks.withType<Test> {
|
|||||||
jsTestsTask.name,
|
jsTestsTask.name,
|
||||||
daemonsTestsTask.name,
|
daemonsTestsTask.name,
|
||||||
otherPluginsTestTask.name,
|
otherPluginsTestTask.name,
|
||||||
mppTestsTask.name
|
mppTestsTask.name,
|
||||||
|
androidTestsTask.name
|
||||||
)
|
)
|
||||||
if (shouldApplyJunitPlatform) {
|
if (shouldApplyJunitPlatform) {
|
||||||
maxHeapSize = "512m"
|
maxHeapSize = "512m"
|
||||||
|
|||||||
+13
@@ -47,6 +47,19 @@ annotation class JsGradlePluginTests
|
|||||||
@Tag("MppKGP")
|
@Tag("MppKGP")
|
||||||
annotation class MppGradlePluginTests
|
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)
|
@Target(AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.FUNCTION)
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
@Tag("OtherKGP")
|
@Tag("OtherKGP")
|
||||||
|
|||||||
Reference in New Issue
Block a user