diff --git a/build.gradle.kts b/build.gradle.kts index cca5b32af82..b8bdf964a95 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -408,9 +408,11 @@ tasks { "plugins-tests" { dependsOn("dist") - dependsOn(":plugins:plugins-tests:test", - ":kotlin-annotation-processing:test", + dependsOn(":kotlin-annotation-processing:test", ":kotlin-source-sections-compiler-plugin:test", + ":kotlin-allopen-compiler-plugin:test", + ":kotlin-noarg-compiler-plugin:test", + ":kotlin-sam-with-receiver-compiler-plugin:test", ":plugins:uast-kotlin:test", ":kotlin-annotation-processing-gradle:test") } diff --git a/compiler/cli/build.gradle.kts b/compiler/cli/build.gradle.kts index b53055f4c09..e4fcbd514f6 100644 --- a/compiler/cli/build.gradle.kts +++ b/compiler/cli/build.gradle.kts @@ -21,6 +21,12 @@ dependencies { compile(commonDep("org.fusesource.jansi", "jansi")) compile(commonDep("org.jline", "jline")) compile(files("${System.getProperty("java.home")}/../lib/tools.jar")) + + testCompile(project(":compiler:backend")) + testCompile(project(":compiler:cli")) + testCompile(project(":compiler:tests-common")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(commonDep("junit:junit")) } sourceSets { @@ -30,5 +36,13 @@ sourceSets { "../builtins-serializer/src", "../javac-wrapper/src") } - "test" {} + "test" { + java.srcDirs("../../plugins/annotation-collector/test") + } } + +testsJar {} + +projectTest { + workingDir = rootDir +} \ No newline at end of file diff --git a/generators/build.gradle.kts b/generators/build.gradle.kts index 78584b28bfb..a9d8c9e8a0a 100644 --- a/generators/build.gradle.kts +++ b/generators/build.gradle.kts @@ -19,15 +19,20 @@ dependencies { compile(projectTests(":compiler:tests-common")) compile(projectTests(":compiler:container")) compile(projectTests(":compiler:incremental-compilation-impl")) + compile(projectTests(":compiler:cli")) compile(projectTests(":idea")) compile(projectTests(":idea:idea-gradle")) compile(projectTests(":idea:idea-maven")) compile(projectTests(":j2k")) compile(projectTests(":idea:idea-android")) compile(projectTests(":jps-plugin")) - compile(projectTests(":plugins:plugins-tests")) + compile(projectTests(":plugins:android-extensions-compiler")) compile(projectTests(":plugins:android-extensions-ide")) + compile(projectTests(":plugins:android-extensions-jps")) compile(projectTests(":kotlin-annotation-processing")) + compile(projectTests(":kotlin-allopen-compiler-plugin")) + compile(projectTests(":kotlin-noarg-compiler-plugin")) + compile(projectTests(":kotlin-sam-with-receiver-compiler-plugin")) compile(projectTests(":plugins:uast-kotlin")) compile(projectTests(":js:js.tests")) compile(projectTests(":generators:test-generator")) diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 2e999c9e41c..6cae8c35e9c 100755 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -921,7 +921,7 @@ fun main(args: Array) { } } - testGroup("plugins/plugins-tests/tests", "plugins/android-extensions/android-extensions-compiler/testData") { + testGroup("plugins/android-extensions/android-extensions-compiler/test", "plugins/android-extensions/android-extensions-compiler/testData") { testClass { model("descriptors", recursive = false, extension = null) } @@ -940,7 +940,7 @@ fun main(args: Array) { } } - testGroup("plugins/plugins-tests/tests", "plugins/annotation-collector/testData") { + testGroup("plugins/annotation-collector/test", "plugins/annotation-collector/testData") { testClass { model("collectToFile", recursive = false, extension = null) } @@ -956,13 +956,13 @@ fun main(args: Array) { } } - testGroup("plugins/plugins-tests/tests", "plugins/allopen/allopen-cli/testData") { + testGroup("plugins/allopen/allopen-cli/test", "plugins/allopen/allopen-cli/testData") { testClass { model("bytecodeListing", extension = "kt") } } - testGroup("plugins/plugins-tests/tests", "plugins/noarg/noarg-cli/testData") { + testGroup("plugins/noarg/noarg-cli/test", "plugins/noarg/noarg-cli/testData") { testClass { model("bytecodeListing", extension = "kt") } @@ -972,7 +972,7 @@ fun main(args: Array) { } } - testGroup("plugins/plugins-tests/tests", "plugins/sam-with-receiver/sam-with-receiver-cli/testData") { + testGroup("plugins/sam-with-receiver/sam-with-receiver-cli/test", "plugins/sam-with-receiver/sam-with-receiver-cli/testData") { testClass { model("diagnostics") } @@ -1054,7 +1054,7 @@ fun main(args: Array) { } } - testGroup("plugins/plugins-tests/tests", "plugins/android-extensions/android-extensions-jps/testData") { + testGroup("plugins/android-extensions/android-extensions-jps/test", "plugins/android-extensions/android-extensions-jps/testData") { testClass { model("android", recursive = false, extension = null) } diff --git a/gradle/project-schema.json b/gradle/project-schema.json index 81b267bf59d..52efa7929c1 100644 --- a/gradle/project-schema.json +++ b/gradle/project-schema.json @@ -4511,42 +4511,6 @@ "reporting": "org.gradle.api.reporting.ReportingExtension" } }, - ":plugins:plugins-tests": { - "conventions": { - "base": "org.gradle.api.plugins.BasePluginConvention", - "java": "org.gradle.api.plugins.JavaPluginConvention" - }, - "configurations": [ - "apiElements", - "archives", - "compile", - "compileClasspath", - "compileOnly", - "default", - "implementation", - "kapt", - "kaptTest", - "runtime", - "runtimeClasspath", - "runtimeElements", - "runtimeOnly", - "testCompile", - "testCompileClasspath", - "testCompileOnly", - "testImplementation", - "testRuntime", - "testRuntimeClasspath", - "testRuntimeOnly", - "tests-jar" - ], - "extensions": { - "ext": "org.gradle.api.plugins.ExtraPropertiesExtension", - "kotlin": "org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension", - "kapt": "org.jetbrains.kotlin.gradle.plugin.KaptExtension", - "defaultArtifacts": "org.gradle.api.internal.plugins.DefaultArtifactPublicationSet", - "reporting": "org.gradle.api.reporting.ReportingExtension" - } - }, ":plugins:uast-kotlin": { "conventions": { "base": "org.gradle.api.plugins.BasePluginConvention", diff --git a/plugins/allopen/allopen-cli/build.gradle.kts b/plugins/allopen/allopen-cli/build.gradle.kts index b0ae4ebf181..72a3a486c60 100644 --- a/plugins/allopen/allopen-cli/build.gradle.kts +++ b/plugins/allopen/allopen-cli/build.gradle.kts @@ -9,17 +9,27 @@ dependencies { compileOnly(project(":compiler:frontend")) runtime(projectRuntimeJar(":kotlin-compiler")) runtime(projectDist(":kotlin-stdlib")) + + testCompile(project(":compiler:backend")) + testCompile(project(":compiler:cli")) + testCompile(project(":compiler:tests-common")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(commonDep("junit:junit")) + + testRuntime(ideaSdkDeps("*.jar")) } sourceSets { "main" { projectDefault() } - "test" {} + "test" { projectDefault() } } val jar = runtimeJar { from(fileTree("$projectDir/src")) { include("META-INF/**") } } +testsJar {} + dist(targetName = the().archivesBaseName.removePrefix("kotlin-") + ".jar") ideaPlugin { @@ -27,3 +37,6 @@ ideaPlugin { rename("^kotlin-", "") } +projectTest { + workingDir = rootDir +} \ No newline at end of file diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt b/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt rename to plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/AbstractBytecodeListingTestForAllOpen.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java b/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java rename to plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java diff --git a/plugins/android-extensions/android-extensions-compiler/build.gradle.kts b/plugins/android-extensions/android-extensions-compiler/build.gradle.kts index 1faf9e05d6c..23b57c1dfd6 100644 --- a/plugins/android-extensions/android-extensions-compiler/build.gradle.kts +++ b/plugins/android-extensions/android-extensions-compiler/build.gradle.kts @@ -11,11 +11,21 @@ dependencies { compile(project(":compiler:frontend.java")) compile(project(":compiler:backend")) compileOnly(project(":kotlin-android-extensions-runtime")) + + testCompile(project(":compiler:util")) + testCompile(project(":compiler:backend")) + testCompile(project(":compiler:cli")) + testCompile(project(":compiler:tests-common")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(projectDist(":kotlin-test:kotlin-test-jvm")) + testCompile(commonDep("junit:junit")) + testRuntime(ideaPluginDeps("idea-junit", "resources_en", plugin = "junit")) + testCompile(project(":kotlin-android-extensions-runtime")) } sourceSets { "main" { projectDefault() } - "test" {} + "test" { projectDefault() } } runtimeJar { @@ -25,3 +35,13 @@ runtimeJar { dist() ideaPlugin() + +testsJar {} + +evaluationDependsOn(":kotlin-android-extensions-runtime") + +projectTest { + environment("ANDROID_EXTENSIONS_RUNTIME_CLASSES", getSourceSetsFrom(":kotlin-android-extensions-runtime")["main"].output.classesDirs.asPath) + dependsOnTaskIfExistsRec("dist", project = rootProject) + workingDir = rootDir +} \ No newline at end of file diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/AbstractAsmLikeInstructionListingTest.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/AbstractAsmLikeInstructionListingTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/AbstractAsmLikeInstructionListingTest.kt rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/AbstractAsmLikeInstructionListingTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/AbstractParcelBoxTest.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/AbstractParcelBoxTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/AbstractParcelBoxTest.kt rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/AbstractParcelBoxTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/AbstractParcelBytecodeListingTest.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/AbstractParcelBytecodeListingTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/AbstractParcelBytecodeListingTest.kt rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/AbstractParcelBytecodeListingTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/ParcelBoxTest.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/ParcelBoxTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/ParcelBoxTest.kt rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/parcel/ParcelBoxTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AbstractAndroidBoxTest.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/synthetic/test/AbstractAndroidBoxTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AbstractAndroidBoxTest.kt rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/synthetic/test/AbstractAndroidBoxTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AbstractAndroidBytecodeShapeTest.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/synthetic/test/AbstractAndroidBytecodeShapeTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AbstractAndroidBytecodeShapeTest.kt rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/synthetic/test/AbstractAndroidBytecodeShapeTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AbstractAndroidSyntheticPropertyDescriptorTest.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/synthetic/test/AbstractAndroidSyntheticPropertyDescriptorTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AbstractAndroidSyntheticPropertyDescriptorTest.kt rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/synthetic/test/AbstractAndroidSyntheticPropertyDescriptorTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/CompilerTestUtils.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/synthetic/test/CompilerTestUtils.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/CompilerTestUtils.kt rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/android/synthetic/test/CompilerTestUtils.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/ParcelBytecodeListingTestGenerated.java b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/ParcelBytecodeListingTestGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/parcel/ParcelBytecodeListingTestGenerated.java rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/ParcelBytecodeListingTestGenerated.java diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AndroidBoxTestGenerated.java b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBoxTestGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AndroidBoxTestGenerated.java rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBoxTestGenerated.java diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AndroidBytecodeShapeTestGenerated.java b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBytecodeShapeTestGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AndroidBytecodeShapeTestGenerated.java rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBytecodeShapeTestGenerated.java diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AndroidSyntheticPropertyDescriptorTestGenerated.java b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidSyntheticPropertyDescriptorTestGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/android/synthetic/test/AndroidSyntheticPropertyDescriptorTestGenerated.java rename to plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidSyntheticPropertyDescriptorTestGenerated.java diff --git a/plugins/android-extensions/android-extensions-jps/build.gradle.kts b/plugins/android-extensions/android-extensions-jps/build.gradle.kts index fe26a59340a..3133c304397 100644 --- a/plugins/android-extensions/android-extensions-jps/build.gradle.kts +++ b/plugins/android-extensions/android-extensions-jps/build.gradle.kts @@ -6,10 +6,27 @@ dependencies { compile(project(":jps-plugin")) compile(project(":plugins:android-extensions-compiler")) compile(ideaPluginDeps("android-jps-plugin", plugin = "android", subdir = "lib/jps")) + + testCompile(projectTests(":jps-plugin")) + testCompile(project(":compiler:tests-common")) + testCompileOnly(ideaSdkDeps("jps-build-test", subdir = "jps/test")) + testRuntime(ideaPluginDeps("*.jar", plugin = "android")) + testCompile(commonDep("junit:junit")) + testCompile(projectDist(":kotlin-test:kotlin-test-jvm")) + testCompile(projectTests(":kotlin-build-common")) + testRuntime(ideaSdkCoreDeps("*.jar")) + testRuntime(ideaSdkDeps("*.jar")) + testRuntime(ideaSdkDeps("*.jar", subdir = "jps/test")) + testRuntime(ideaSdkDeps("*.jar", subdir = "jps")) } sourceSets { "main" { projectDefault() } - "test" {} + "test" { projectDefault() } } +projectTest { + workingDir = rootDir +} + +testsJar {} \ No newline at end of file diff --git a/plugins/android-extensions/android-extensions-jps/src/KotlinAndroidJpsPlugin.kt b/plugins/android-extensions/android-extensions-jps/src/KotlinAndroidJpsPlugin.kt index 07ba17cf045..68b48104fb4 100644 --- a/plugins/android-extensions/android-extensions-jps/src/KotlinAndroidJpsPlugin.kt +++ b/plugins/android-extensions/android-extensions-jps/src/KotlinAndroidJpsPlugin.kt @@ -70,9 +70,8 @@ class KotlinAndroidJpsPlugin : KotlinJpsCompilerArgumentsProvider { val libDirectory = File(PathUtil.getJarPathForClass(this::class.java)).parentFile.parentFile File(libDirectory, JAR_FILE_NAME).absolutePath } else { - // We're in tests now (in out/production/android-extensions/android-extensions-jps) - val kotlinProjectDirectory = File(PathUtil.getJarPathForClass(this::class.java)).parentFile.parentFile.parentFile - File(kotlinProjectDirectory, "dist/kotlinc/lib/$JAR_FILE_NAME").absolutePath + // We're in tests now (project root dir) + File("dist/kotlinc/lib/$JAR_FILE_NAME").absolutePath }) } else emptyList() diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/jps/build/android/AbstractAndroidJpsTestCase.kt b/plugins/android-extensions/android-extensions-jps/test/org/jetbrains/kotlin/jps/build/android/AbstractAndroidJpsTestCase.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/jps/build/android/AbstractAndroidJpsTestCase.kt rename to plugins/android-extensions/android-extensions-jps/test/org/jetbrains/kotlin/jps/build/android/AbstractAndroidJpsTestCase.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/jps/build/android/AndroidJpsTestCaseGenerated.java b/plugins/android-extensions/android-extensions-jps/test/org/jetbrains/kotlin/jps/build/android/AndroidJpsTestCaseGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/jps/build/android/AndroidJpsTestCaseGenerated.java rename to plugins/android-extensions/android-extensions-jps/test/org/jetbrains/kotlin/jps/build/android/AndroidJpsTestCaseGenerated.java diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/AbstractAnnotationProcessorBoxTest.kt b/plugins/annotation-collector/test/org/jetbrains/kotlin/annotation/AbstractAnnotationProcessorBoxTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/AbstractAnnotationProcessorBoxTest.kt rename to plugins/annotation-collector/test/org/jetbrains/kotlin/annotation/AbstractAnnotationProcessorBoxTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/AnnotationProcessorBoxTestGenerated.java b/plugins/annotation-collector/test/org/jetbrains/kotlin/annotation/AnnotationProcessorBoxTestGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/annotation/AnnotationProcessorBoxTestGenerated.java rename to plugins/annotation-collector/test/org/jetbrains/kotlin/annotation/AnnotationProcessorBoxTestGenerated.java diff --git a/plugins/kapt3/build.gradle.kts b/plugins/kapt3/build.gradle.kts index 6e0bf046eff..32283db10b7 100644 --- a/plugins/kapt3/build.gradle.kts +++ b/plugins/kapt3/build.gradle.kts @@ -10,6 +10,8 @@ dependencies { compile(project(":compiler:frontend")) compile(project(":compiler:frontend.java")) compile(project(":compiler:plugin-api")) + + testCompile(project(":compiler:tests-common")) testCompile(projectTests(":compiler:tests-common")) testCompile(ideaSdkDeps("idea", "idea_rt", "openapi")) testCompile(commonDep("junit:junit")) diff --git a/plugins/noarg/noarg-cli/build.gradle.kts b/plugins/noarg/noarg-cli/build.gradle.kts index 29112600f5a..1bdf570f730 100644 --- a/plugins/noarg/noarg-cli/build.gradle.kts +++ b/plugins/noarg/noarg-cli/build.gradle.kts @@ -11,17 +11,25 @@ dependencies { compileOnly(project(":compiler:plugin-api")) runtime(projectRuntimeJar(":kotlin-compiler")) runtime(projectDist(":kotlin-stdlib")) + + testCompile(project(":compiler:backend")) + testCompile(project(":compiler:cli")) + testCompile(project(":compiler:tests-common")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(commonDep("junit:junit")) } sourceSets { "main" { projectDefault() } - "test" {} + "test" { projectDefault() } } val jar = runtimeJar { from(fileTree("$projectDir/src")) { include("META-INF/**") } } +testsJar {} + dist(targetName = the().archivesBaseName.removePrefix("kotlin-") + ".jar") ideaPlugin { @@ -29,3 +37,6 @@ ideaPlugin { rename("^kotlin-", "") } +projectTest { + workingDir = rootDir +} \ No newline at end of file diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/noarg/AbstractBlackBoxCodegenTestForNoArg.kt b/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/AbstractBlackBoxCodegenTestForNoArg.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/noarg/AbstractBlackBoxCodegenTestForNoArg.kt rename to plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/AbstractBlackBoxCodegenTestForNoArg.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/noarg/AbstractBytecodeListingTestForNoArg.kt b/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/AbstractBytecodeListingTestForNoArg.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/noarg/AbstractBytecodeListingTestForNoArg.kt rename to plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/AbstractBytecodeListingTestForNoArg.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/noarg/BlackBoxCodegenTestForNoArgGenerated.java b/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BlackBoxCodegenTestForNoArgGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/noarg/BlackBoxCodegenTestForNoArgGenerated.java rename to plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BlackBoxCodegenTestForNoArgGenerated.java diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/noarg/BytecodeListingTestForNoArgGenerated.java b/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BytecodeListingTestForNoArgGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/noarg/BytecodeListingTestForNoArgGenerated.java rename to plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BytecodeListingTestForNoArgGenerated.java diff --git a/plugins/plugins-tests/build.gradle.kts b/plugins/plugins-tests/build.gradle.kts deleted file mode 100644 index 413c18f9094..00000000000 --- a/plugins/plugins-tests/build.gradle.kts +++ /dev/null @@ -1,51 +0,0 @@ - -apply { plugin("kotlin") } - -dependencies { - testCompile(project(":compiler:util")) - testCompile(project(":compiler:backend")) - testCompile(project(":compiler:cli")) - testCompile(project(":plugins:android-extensions-compiler")) - testCompile(project(":plugins:android-extensions-ide")) - testCompile(project(":kotlin-android-extensions-runtime")) - testCompile(project(":allopen-ide-plugin")) { isTransitive = false } - testCompile(project(":kotlin-allopen-compiler-plugin")) - testCompile(project(":noarg-ide-plugin")) { isTransitive = false } - testCompile(project(":kotlin-noarg-compiler-plugin")) - testCompile(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false } - testCompile(project(":sam-with-receiver-ide-plugin")) { isTransitive = false } - testCompile(project(":kotlin-sam-with-receiver-compiler-plugin")) - testCompile(project(":idea:idea-android")) { isTransitive = false } - testCompile(project(":plugins:lint")) { isTransitive = false } - testCompile(project(":plugins:uast-kotlin")) - testCompile(projectDist(":kotlin-test:kotlin-test-jvm")) - testCompile(projectTests(":compiler:tests-common")) - testCompile(projectTests(":jps-plugin")) - testCompile(commonDep("junit:junit")) - testCompileOnly(ideaSdkDeps("jps-builders")) - testCompile(ideaSdkDeps("jps-build-test", subdir = "jps/test")) - testCompile(ideaPluginDeps("*.jar", plugin = "android", subdir = "lib/jps")) - testRuntime(projectDist(":kotlin-reflect")) - testRuntime(project(":jps-plugin")) - testRuntime(projectTests(":compiler:tests-common-jvm6")) - testRuntime(ideaSdkDeps("*.jar")) - testRuntime(ideaPluginDeps("idea-junit", "resources_en", plugin = "junit")) - testRuntime(ideaPluginDeps("*.jar", plugin = "gradle")) - testRuntime(ideaPluginDeps("*.jar", plugin = "android")) - testRuntime(preloadedDeps("dx", subdir = "android-5.0/lib")) -} - -sourceSets { - "main" {} - "test" { projectDefault() } -} - -testsJar {} - -evaluationDependsOn(":kotlin-android-extensions-runtime") - -projectTest { - environment("ANDROID_EXTENSIONS_RUNTIME_CLASSES", getSourceSetsFrom(":kotlin-android-extensions-runtime")["main"].output.classesDirs.asPath) - dependsOnTaskIfExistsRec("dist", project = rootProject) - workingDir = rootDir -} diff --git a/plugins/sam-with-receiver/sam-with-receiver-cli/build.gradle.kts b/plugins/sam-with-receiver/sam-with-receiver-cli/build.gradle.kts index 3c11a4c8923..670326caa8f 100644 --- a/plugins/sam-with-receiver/sam-with-receiver-cli/build.gradle.kts +++ b/plugins/sam-with-receiver/sam-with-receiver-cli/build.gradle.kts @@ -9,11 +9,19 @@ dependencies { compileOnly(project(":compiler:plugin-api")) runtime(projectRuntimeJar(":kotlin-compiler")) runtime(projectDist(":kotlin-stdlib")) + runtime(projectDist(":kotlin-reflect")) + + testCompile(project(":compiler:backend")) + testCompile(project(":compiler:cli")) + testCompile(project(":compiler:tests-common")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(commonDep("junit:junit")) + testRuntime(ideaSdkDeps("*.jar")) } sourceSets { "main" { projectDefault() } - "test" {} + "test" { projectDefault() } } val jar = runtimeJar { @@ -21,6 +29,7 @@ val jar = runtimeJar { } sourcesJar() javadocJar() +testsJar {} publish() @@ -33,3 +42,6 @@ ideaPlugin { rename("^kotlin-", "") } +projectTest { + workingDir = rootDir +} \ No newline at end of file diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/samWithReceiver/AbstractSamWithReceiverScriptTest.kt b/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/AbstractSamWithReceiverScriptTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/samWithReceiver/AbstractSamWithReceiverScriptTest.kt rename to plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/AbstractSamWithReceiverScriptTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/samWithReceiver/AbstractSamWithReceiverTest.kt b/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/AbstractSamWithReceiverTest.kt similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/samWithReceiver/AbstractSamWithReceiverTest.kt rename to plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/AbstractSamWithReceiverTest.kt diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverScriptTestGenerated.java b/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverScriptTestGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverScriptTestGenerated.java rename to plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverScriptTestGenerated.java diff --git a/plugins/plugins-tests/tests/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverTestGenerated.java b/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverTestGenerated.java similarity index 100% rename from plugins/plugins-tests/tests/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverTestGenerated.java rename to plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverTestGenerated.java diff --git a/settings.gradle b/settings.gradle index fec545fa71e..48d276cfd95 100644 --- a/settings.gradle +++ b/settings.gradle @@ -88,7 +88,6 @@ include ":kotlin-build-common", ":plugins:uast-kotlin", ":plugins:uast-kotlin-idea", ":plugins:annotation-based-compiler-plugins-ide-support", - ":plugins:plugins-tests", ":kotlin-script-runtime", ":kotlin-runtime", ":kotlin-test",