From 630b39d6b0312e376ef15d7dbad21dc139b95308 Mon Sep 17 00:00:00 2001 From: Nicolay Mitropolsky Date: Tue, 15 Jan 2019 18:51:49 +0300 Subject: [PATCH] 191: Uast: compiling with `-Xjvm-default=compatibility` --- plugins/uast-kotlin/build.gradle.kts.191 | 80 ++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 plugins/uast-kotlin/build.gradle.kts.191 diff --git a/plugins/uast-kotlin/build.gradle.kts.191 b/plugins/uast-kotlin/build.gradle.kts.191 new file mode 100644 index 00000000000..6bf6f04b122 --- /dev/null +++ b/plugins/uast-kotlin/build.gradle.kts.191 @@ -0,0 +1,80 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + kotlin("jvm") + id("jps-compatible") +} + +dependencies { + compile(project(":kotlin-stdlib")) + compile(project(":core:util.runtime")) + compile(project(":compiler:backend")) + compile(project(":compiler:frontend")) + compile(project(":compiler:frontend.java")) + compile(project(":compiler:light-classes")) + + Platform[181].orHigher { + // BEWARE: Uast should not depend on IDEA. + compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + compileOnly(intellijDep()) { includeJars("java-api", "java-impl", "asm-all", rootProject = rootProject) } + } + + Platform[173].orLower { + compile(project(":idea:idea-core")) + compileOnly(intellijDep()) { includeJars("openapi", "idea", "util", "extensions", "asm-all", rootProject = rootProject) } + } + + testCompile(project(":kotlin-test:kotlin-test-jvm")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(commonDep("junit:junit")) + testCompile(project(":compiler:util")) + testCompile(project(":compiler:cli")) + testCompile(projectTests(":idea:idea-test-framework")) + + Platform[181].orHigher { + testCompileOnly(intellijDep()) { includeJars("java-api", "java-impl") } + } + + Platform[173].orLower { + testCompileOnly(intellijDep()) { includeJars("idea_rt") } + } + + testCompile(project(":idea:idea-native")) { isTransitive = false } + testCompile(project(":idea:idea-gradle-native")) { isTransitive = false } + + testRuntime(project(":kotlin-native:kotlin-native-library-reader")) { isTransitive = false } + testRuntime(project(":kotlin-native:kotlin-native-utils")) { isTransitive = false } + testRuntime(project(":kotlin-reflect")) + testRuntime(project(":idea:idea-android")) + testRuntime(project(":idea:idea-gradle")) + testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false } + testRuntime(project(":sam-with-receiver-ide-plugin")) + testRuntime(project(":allopen-ide-plugin")) + testRuntime(project(":noarg-ide-plugin")) + testRuntime(project(":kotlin-scripting-idea")) + testRuntime(project(":plugins:android-extensions-ide")) + testRuntime(project(":plugins:kapt3-idea")) + testRuntime(project(":kotlinx-serialization-ide-plugin")) + testRuntime(intellijDep()) + testRuntime(intellijPluginDep("junit")) + testRuntime(intellijPluginDep("gradle")) + testRuntime(intellijPluginDep("Groovy")) + testRuntime(intellijPluginDep("properties")) +} + +sourceSets { + "main" { projectDefault() } + "test" { projectDefault() } +} + +testsJar {} + +projectTest { + workingDir = rootDir +} + +val compileKotlin: KotlinCompile by tasks +compileKotlin.kotlinOptions { + freeCompilerArgs = listOf("-Xjvm-default=compatibility") +} +