From b6542caf47c7faea3bd0c3c2af2e03ce432bc9cc Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Thu, 26 Oct 2017 03:52:37 +0300 Subject: [PATCH] Setup system property for NI tests with parameter -PnewInferenceTests --- buildSrc/src/main/kotlin/tasks.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/buildSrc/src/main/kotlin/tasks.kt b/buildSrc/src/main/kotlin/tasks.kt index 602bce4c448..5796f045854 100644 --- a/buildSrc/src/main/kotlin/tasks.kt +++ b/buildSrc/src/main/kotlin/tasks.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + @file:Suppress("unused") // usages in build scripts are not tracked properly import org.gradle.api.Project @@ -57,6 +73,7 @@ fun Project.projectTest(taskName: String = "test", body: Test.() -> Unit = {}): environment("PROJECT_CLASSES_DIRS", the().sourceSets.getByName("test").output.classesDirs.asPath) environment("PROJECT_BUILD_DIR", buildDir) systemProperty("jps.kotlin.home", rootProject.extra["distKotlinHomeDir"]) + systemProperty("kotlin.ni", if (rootProject.hasProperty("newInferenceTests")) "true" else "false") body() }