From 3aabeca191994579437d5dd3ce1376871d77be0a Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Sat, 2 Sep 2017 14:17:17 +0300 Subject: [PATCH] Fix maven and android tests after modularizing and rebasing --- compiler/compiler.pro | 1 + generators/build.gradle.kts | 10 +++++++++- idea/idea-android/build.gradle.kts | 1 + js/js.ast/build.gradle.kts | 2 ++ js/js.frontend/build.gradle.kts | 2 ++ js/js.serializer/build.gradle.kts | 2 ++ js/js.translator/build.gradle.kts | 2 ++ libraries/examples/kotlin-java-example/pom.xml | 8 ++++++++ libraries/tools/kotlin-maven-plugin/pom.xml | 15 +++++++++++++++ libraries/tools/kotlin-reflect/build.gradle | 2 +- 10 files changed, 43 insertions(+), 2 deletions(-) diff --git a/compiler/compiler.pro b/compiler/compiler.pro index 14e16a5ffeb..169717a7c94 100644 --- a/compiler/compiler.pro +++ b/compiler/compiler.pro @@ -165,6 +165,7 @@ messages/**) -keep class gnu.trove.TIntHashSet { *; } -keep class gnu.trove.TIntIterator { *; } -keep class org.iq80.snappy.SlowMemory { *; } +-keep class javaslang.match.PatternsProcessor { *; } -keepclassmembers enum * { public static **[] values(); diff --git a/generators/build.gradle.kts b/generators/build.gradle.kts index 34a2f3bcde3..c7b94b922c5 100644 --- a/generators/build.gradle.kts +++ b/generators/build.gradle.kts @@ -32,7 +32,7 @@ dependencies { compile(projectTests(":plugins:uast-kotlin")) compile(projectTests(":js:js.tests")) compile(protobufFull()) - compileOnly(ideaSdkDeps("jps-build-test", subdir = "jps/test")) + compile(ideaSdkDeps("jps-build-test", subdir = "jps/test")) testCompile(project(":compiler.tests-common")) testCompile(project(":idea:idea-test-framework")) { isTransitive = false } testCompile(project(":compiler:incremental-compilation-impl")) @@ -62,3 +62,11 @@ sourceSets { projectTest { workingDir = rootDir } + +val generateTests by task { + classpath = the().sourceSets["test"].runtimeClasspath + + main = "org.jetbrains.kotlin.generators.tests.GenerateTestsKt" + + workingDir = rootDir +} \ No newline at end of file diff --git a/idea/idea-android/build.gradle.kts b/idea/idea-android/build.gradle.kts index f2a2de2a221..58abc3782b0 100644 --- a/idea/idea-android/build.gradle.kts +++ b/idea/idea-android/build.gradle.kts @@ -21,6 +21,7 @@ dependencies { testCompile(project(":compiler.tests-common")) testCompile(project(":idea:idea-test-framework")) { isTransitive = false } testCompile(project(":plugins:lint")) { isTransitive = false } + testCompile(project(":idea:idea-jvm")) testCompile(projectTests(":idea")) testCompile(projectTests(":idea:idea-gradle")) testCompile(ideaPluginDeps("properties", plugin = "properties")) diff --git a/js/js.ast/build.gradle.kts b/js/js.ast/build.gradle.kts index 04512bd5676..6546fd1f707 100644 --- a/js/js.ast/build.gradle.kts +++ b/js/js.ast/build.gradle.kts @@ -1,6 +1,8 @@ apply { plugin("kotlin") } +jvmTarget = "1.6" + dependencies { compile(project(":compiler:util")) compile(project(":compiler:frontend")) diff --git a/js/js.frontend/build.gradle.kts b/js/js.frontend/build.gradle.kts index 1b0bb713edd..7f94ddb68ae 100644 --- a/js/js.frontend/build.gradle.kts +++ b/js/js.frontend/build.gradle.kts @@ -1,6 +1,8 @@ apply { plugin("kotlin") } +jvmTarget = "1.6" + dependencies { compile(project(":compiler:util")) compile(project(":compiler:frontend")) diff --git a/js/js.serializer/build.gradle.kts b/js/js.serializer/build.gradle.kts index 9549297f921..63d851199f7 100644 --- a/js/js.serializer/build.gradle.kts +++ b/js/js.serializer/build.gradle.kts @@ -1,6 +1,8 @@ apply { plugin("kotlin") } +jvmTarget = "1.6" + dependencies { compile(project(":compiler:util")) compile(project(":compiler:frontend")) diff --git a/js/js.translator/build.gradle.kts b/js/js.translator/build.gradle.kts index 747c9c2b55a..855b9800337 100644 --- a/js/js.translator/build.gradle.kts +++ b/js/js.translator/build.gradle.kts @@ -1,6 +1,8 @@ apply { plugin("kotlin") } +jvmTarget = "1.6" + dependencies { compile(project(":core")) compile(project(":compiler:util")) diff --git a/libraries/examples/kotlin-java-example/pom.xml b/libraries/examples/kotlin-java-example/pom.xml index fe9deac355c..b7c9a9e31dd 100644 --- a/libraries/examples/kotlin-java-example/pom.xml +++ b/libraries/examples/kotlin-java-example/pom.xml @@ -39,6 +39,14 @@ + + org.apache.maven.plugins + maven-surefire-plugin + 2.19.1 + + ${env.JDK_18}/bin/java + + diff --git a/libraries/tools/kotlin-maven-plugin/pom.xml b/libraries/tools/kotlin-maven-plugin/pom.xml index 6e6b3823b79..9b165e627a6 100644 --- a/libraries/tools/kotlin-maven-plugin/pom.xml +++ b/libraries/tools/kotlin-maven-plugin/pom.xml @@ -40,6 +40,21 @@ kotlin-compiler ${project.version} + + org.jetbrains.kotlin + kotlin-stdlib + ${project.version} + + + org.jetbrains.kotlin + kotlin-reflect + ${project.version} + + + org.jetbrains.kotlin + kotlin-script-runtime + ${project.version} + org.codehaus.groovy groovy-all diff --git a/libraries/tools/kotlin-reflect/build.gradle b/libraries/tools/kotlin-reflect/build.gradle index c745bc8541f..441360bb2ce 100644 --- a/libraries/tools/kotlin-reflect/build.gradle +++ b/libraries/tools/kotlin-reflect/build.gradle @@ -47,7 +47,7 @@ dependencies { shadows project(path: ':custom-dependencies:protobuf-lite', configuration: 'default') compile project(':kotlin-stdlib') - compile project(path: ':custom-dependencies:protobuf-lite', configuration: 'default') + compileOnly project(path: ':custom-dependencies:protobuf-lite', configuration: 'default') } task copyAnnotations(type: Sync) {