Build: Pass TC parallelTests.excludesFile to Kotlin/Native tests

Some tests excluded by TC in the current parallel tests batch are not
properly excluded from execution due to a bug in Gradle.
As a workaround, disable excluded tests by a JUnit ExecutionCondition
extension.

 #KTI-2074
 #KTI-2611
diff --git a/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/nativeTest.kt b/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/nativeTest.kt
index 62638d6..dfb6952 100644
--- a/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/nativeTest.kt
+++ b/repo/gradle-build-conventions/project-tests-convention/src/main/kotlin/nativeTest.kt
@@ -366,6 +366,11 @@
         // Pass the current Gradle task name so test can use it in logging.
         environment("GRADLE_TASK_NAME", path)
 
+        val excludesFile = project.providers.gradleProperty("teamcity.build.parallelTests.excludesFile").orNull
+        if (excludesFile != null && File(excludesFile).exists()) {
+            systemProperty("teamcity.build.parallelTests.excludesFile", excludesFile)
+        }
+
         useJUnitPlatform {
             // Note: arbitrary JUnit tag expressions can be used in this property.
             // See https://junit.org/junit5/docs/current/user-guide/#running-tests-tag-expressions