From a3bef10b97bedac9beab1f09290259a1943446b3 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Tue, 1 Sep 2020 18:05:41 +0300 Subject: [PATCH] as42: Add fastutil library to dependency to make KtUsefulTestCase. work java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/objects/Object2FloatMap at com.intellij.configurationStore.MyXmlSerializer$bindingProducer$1.createRootBinding(xmlSerializer.kt:172) at com.intellij.configurationStore.MyXmlSerializer$bindingProducer$1.createRootBinding(xmlSerializer.kt:170) at com.intellij.configurationStore.OldBindingProducer.getRootBinding(xmlSerializer.kt:154) at com.intellij.configurationStore.MyXmlSerializer.getRootBinding(xmlSerializer.kt:186) at com.intellij.util.xmlb.Serializer.getRootBinding(Serializer.java:18) at com.intellij.configurationStore.JdomSerializerImpl.serializeObjectInto(xmlSerializer.kt:78) at com.intellij.configurationStore.XmlSerializer.serializeObjectInto(xmlSerializer.kt:39) at com.intellij.configurationStore.XmlSerializer.serializeObjectInto$default(xmlSerializer.kt:38) at com.intellij.configurationStore.XmlSerializer.serializeObjectInto(xmlSerializer.kt) at com.intellij.codeInsight.CodeInsightSettings.writeExternal(CodeInsightSettings.java:231) at org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase.(KtUsefulTestCase.java:123) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at junit.framework.TestSuite.createTest(TestSuite.java:60) at junit.framework.TestSuite.addTestMethod(TestSuite.java:307) at junit.framework.TestSuite.addTestsFromTestCase(TestSuite.java:150) at junit.framework.TestSuite.(TestSuite.java:129) --- compiler/tests-common/build.gradle.kts.as42 | 105 ++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 compiler/tests-common/build.gradle.kts.as42 diff --git a/compiler/tests-common/build.gradle.kts.as42 b/compiler/tests-common/build.gradle.kts.as42 new file mode 100644 index 00000000000..5a9935199e0 --- /dev/null +++ b/compiler/tests-common/build.gradle.kts.as42 @@ -0,0 +1,105 @@ + +plugins { + kotlin("jvm") + id("jps-compatible") +} + +dependencies { + testCompile(project(":kotlin-scripting-compiler")) + testCompile(project(":core:descriptors")) + testCompile(project(":core:descriptors.jvm")) + testCompile(project(":core:deserialization")) + testCompile(project(":compiler:util")) + testCompile(project(":compiler:backend")) + testCompile(project(":compiler:fir:tree")) + testCompile(project(":compiler:fir:raw-fir:psi2fir")) + testCompile(project(":compiler:fir:raw-fir:light-tree2fir")) + testCompile(project(":compiler:fir:fir2ir")) + testCompile(project(":compiler:fir:jvm")) + testCompile(project(":compiler:fir:fir2ir:jvm-backend")) + testCompile(project(":compiler:fir:fir-serialization")) + testCompile(project(":compiler:fir:cones")) + testCompile(project(":compiler:fir:resolve")) + testCompile(project(":compiler:fir:checkers")) + testCompile(project(":compiler:fir:java")) + testCompile(project(":compiler:ir.ir2cfg")) + testCompile(project(":compiler:frontend")) + testCompile(project(":compiler:frontend.java")) + testCompile(project(":compiler:util")) + testCompile(project(":compiler:cli-common")) + testCompile(project(":compiler:cli")) + testCompile(project(":compiler:cli-js")) + testCompile(project(":compiler:light-classes")) + testCompile(project(":compiler:serialization")) + testCompile(project(":kotlin-preloader")) + testCompile(project(":compiler:cli-common")) + testCompile(project(":daemon-common")) + testCompile(project(":daemon-common-new")) + testCompile(project(":js:js.serializer")) + testCompile(project(":js:js.frontend")) + testCompile(project(":js:js.translator")) + testCompile(project(":native:frontend.native")) + testCompileOnly(project(":plugins:android-extensions-compiler")) + testCompile(project(":kotlin-test:kotlin-test-jvm")) + testCompile(projectTests(":compiler:tests-common-jvm6")) + testCompile(project(":kotlin-scripting-compiler-impl")) + testCompile(commonDep("junit:junit")) + testCompile(androidDxJar()) { isTransitive = false } + testCompile(commonDep("com.android.tools:r8")) + testCompileOnly(project(":kotlin-reflect-api")) + testCompileOnly(toolsJar()) + testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } + Platform[193].orLower { + testCompile(intellijDep()) { includeJars("openapi", "picocontainer", rootProject = rootProject) } + } + Platform[201].orHigher { + testCompile(intellijDep()) { + includeJars( + "testFramework", + "testFramework.core", + rootProject = rootProject + ) + } + } + testCompile(intellijDep()) { + includeJars( + "jps-model", + "extensions", + "util", + "platform-api", + "platform-impl", + "idea", + "idea_rt", + "guava", + "trove4j", + "asm-all", + "log4j", + "jdom", + "streamex", + "bootstrap", + rootProject = rootProject + ) + isTransitive = false + } + + Platform[192].orHigher { + testCompile(intellijDep()) { includeJars("platform-util-ui", "platform-concurrency", "platform-objectSerializer") } + } + + Platform[193].orHigher { + testCompile(intellijDep()) { includeJars("platform-ide-util-io") } + } + if (Platform.P202.orHigher()) { + testCompile(intellijDep()) { + includeJars("intellij-deps-fastutil-8.3.1-1") + isTransitive = false + } + } +} + +sourceSets { + "main" { } + "test" { projectDefault() } +} + +testsJar {}