diff --git a/build.gradle.kts b/build.gradle.kts index 97feaeaa123..2ecb95e1472 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -628,6 +628,7 @@ tasks { ":compiler:tests-against-klib:test" ) dependsOn(":plugins:jvm-abi-gen:test") + dependsOn(":repo:codebase-tests:test") } register("testsForBootstrapBuildTest") { @@ -791,6 +792,10 @@ tasks { dependsOn(":kotlin-annotation-processing-cli:test") } + register("codebaseTests") { + dependsOn(":repo:codebase-tests:test") + } + register("test") { doLast { throw GradleException("Don't use directly, use aggregate tasks *-check instead") diff --git a/compiler/build.gradle.kts b/compiler/build.gradle.kts index 5340c07260b..f49dc6588bc 100644 --- a/compiler/build.gradle.kts +++ b/compiler/build.gradle.kts @@ -35,9 +35,6 @@ dependencies { testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false } testImplementation(toolsJar()) - testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.12.7") - testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.7") - testImplementation("com.fasterxml.woodstox:woodstox-core:6.2.4") antLauncherJar(commonDependency("org.apache.ant", "ant")) antLauncherJar(toolsJar()) diff --git a/repo/codebase-tests/build.gradle.kts b/repo/codebase-tests/build.gradle.kts new file mode 100644 index 00000000000..479e51143b0 --- /dev/null +++ b/repo/codebase-tests/build.gradle.kts @@ -0,0 +1,27 @@ +plugins { + kotlin("jvm") + id("jps-compatible") +} + +dependencies { + testImplementation(intellijCore()) + testImplementation(projectTests(":compiler:tests-common")) + + testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.12.7") + testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.7") + testImplementation("com.fasterxml.woodstox:woodstox-core:6.2.4") +} + +sourceSets { + "main" {} + "test" { + projectDefault() + } +} + +projectTest() { + dependsOn(":dist") + workingDir = rootDir +} + +testsJar() \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/code/CodeConformanceTest.kt b/repo/codebase-tests/tests/org/jetbrains/kotlin/code/CodeConformanceTest.kt similarity index 99% rename from compiler/tests/org/jetbrains/kotlin/code/CodeConformanceTest.kt rename to repo/codebase-tests/tests/org/jetbrains/kotlin/code/CodeConformanceTest.kt index b54247ec6b8..377112008f8 100644 --- a/compiler/tests/org/jetbrains/kotlin/code/CodeConformanceTest.kt +++ b/repo/codebase-tests/tests/org/jetbrains/kotlin/code/CodeConformanceTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ diff --git a/compiler/tests/org/jetbrains/kotlin/code/DepsVerificationMetadataTest.kt b/repo/codebase-tests/tests/org/jetbrains/kotlin/code/DepsVerificationMetadataTest.kt similarity index 100% rename from compiler/tests/org/jetbrains/kotlin/code/DepsVerificationMetadataTest.kt rename to repo/codebase-tests/tests/org/jetbrains/kotlin/code/DepsVerificationMetadataTest.kt diff --git a/compiler/tests/org/jetbrains/kotlin/code/ReflectionCodeSanityTest.kt b/repo/codebase-tests/tests/org/jetbrains/kotlin/code/ReflectionCodeSanityTest.kt similarity index 86% rename from compiler/tests/org/jetbrains/kotlin/code/ReflectionCodeSanityTest.kt rename to repo/codebase-tests/tests/org/jetbrains/kotlin/code/ReflectionCodeSanityTest.kt index 1422b4ef5fe..3d2798ab043 100644 --- a/compiler/tests/org/jetbrains/kotlin/code/ReflectionCodeSanityTest.kt +++ b/repo/codebase-tests/tests/org/jetbrains/kotlin/code/ReflectionCodeSanityTest.kt @@ -1,17 +1,6 @@ /* - * Copyright 2010-2015 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. + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.code diff --git a/settings.gradle b/settings.gradle index dba70487720..5662b729fa8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -305,8 +305,8 @@ include ":kotlin-imports-dumper-compiler-plugin", ":plugins:jvm-abi-gen", ":plugins:jvm-abi-gen-embeddable", ":test-instrumenter", - ":wasm:wasm.ir" - + ":wasm:wasm.ir", + ":repo:codebase-tests" include ":kotlinx-atomicfu-compiler-plugin", ":kotlinx-atomicfu-runtime",