From 75c8b787c25899e40671fbddc3a921f86d716f21 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Sun, 22 Oct 2017 05:42:13 +0300 Subject: [PATCH] Fix maven tests - Add required extra dependencies to install to local repo before test. - Remove expected warning about runtime bundled into compiler because it is no more. - Fix basedir reference in kapt-allopen test. - Fix reflection tests after deprecated members removal. --- libraries/tools/kotlin-maven-plugin-test/pom.xml | 2 ++ .../src/it/test-kapt-allopen/verify.bsh | 2 +- .../kotlin-maven-plugin-test/src/it/test-plugins/expected.log | 2 -- .../src/it/test-reflection/src/main/kotlin/main/main.kt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/tools/kotlin-maven-plugin-test/pom.xml b/libraries/tools/kotlin-maven-plugin-test/pom.xml index 698b0c3d091..25b1c5e4614 100644 --- a/libraries/tools/kotlin-maven-plugin-test/pom.xml +++ b/libraries/tools/kotlin-maven-plugin-test/pom.xml @@ -122,6 +122,8 @@ org.jetbrains.kotlin:kotlin-maven-plugin:${project.version} org.jetbrains.kotlin:kotlin-maven-allopen:${project.version} org.jetbrains.kotlin:kotlin-maven-noarg:${project.version} + org.jetbrains.kotlin:kotlin-maven-sam-with-receiver:${project.version} + org.jetbrains.kotlin:kotlin-annotation-processing-maven:${project.version} org.jetbrains.kotlin:kotlin-runtime:${project.version} org.jetbrains.kotlin:kotlin-script-runtime:${project.version} org.jetbrains.kotlin:kotlin-stdlib:${project.version} diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-kapt-allopen/verify.bsh b/libraries/tools/kotlin-maven-plugin-test/src/it/test-kapt-allopen/verify.bsh index 9171c19b590..f8b8b9770cc 100644 --- a/libraries/tools/kotlin-maven-plugin-test/src/it/test-kapt-allopen/verify.bsh +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-kapt-allopen/verify.bsh @@ -5,7 +5,7 @@ if (!file.exists() || !file.isFile()) { throw new FileNotFoundException("Could not find generated JAR: " + file); } -File generatedFile = new File(baseDir, "target/generated-sources/kapt/compile/coffee/CoffeeMaker_Factory.java"); +File generatedFile = new File(basedir, "target/generated-sources/kapt/compile/coffee/CoffeeMaker_Factory.java"); if (!generatedFile.exists() || !generatedFile.isFile()) { throw new FileNotFoundException("Kapt was not executed, file is absent: " + generatedFile); } \ No newline at end of file diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-plugins/expected.log b/libraries/tools/kotlin-maven-plugin-test/src/it/test-plugins/expected.log index 19e6a306de6..a3f5a309353 100644 --- a/libraries/tools/kotlin-maven-plugin-test/src/it/test-plugins/expected.log +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-plugins/expected.log @@ -1,5 +1,3 @@ -[WARNING] Some JAR files in the classpath have the Kotlin Runtime library bundled into them. This may cause difficult to debug problems if there's a different version of the Kotlin Runtime library in the classpath. Consider removing these libraries from the classpath or use '-Xskip-runtime-version-check' to suppress this warning -[WARNING] /local-repo/org/jetbrains/kotlin/kotlin-compiler/@snapshot@/kotlin-compiler-@snapshot@.jar: (-1, -1) Library has Kotlin runtime bundled into it [WARNING] No sources found skipping Kotlin compile [INFO] Applicability test for project use-test-extension [INFO] Applied plugin: 'test-me' diff --git a/libraries/tools/kotlin-maven-plugin-test/src/it/test-reflection/src/main/kotlin/main/main.kt b/libraries/tools/kotlin-maven-plugin-test/src/it/test-reflection/src/main/kotlin/main/main.kt index a4dddd73f26..69b67806494 100644 --- a/libraries/tools/kotlin-maven-plugin-test/src/it/test-reflection/src/main/kotlin/main/main.kt +++ b/libraries/tools/kotlin-maven-plugin-test/src/it/test-reflection/src/main/kotlin/main/main.kt @@ -17,6 +17,7 @@ package main import kotlin.reflect.* +import kotlin.reflect.full.* fun topLevelFun() {}