From 8d2508e3516182181f2ae505d69bc867bf487c05 Mon Sep 17 00:00:00 2001 From: Alexey Tsvetkov Date: Wed, 14 Mar 2018 13:56:48 +0300 Subject: [PATCH] 181: Fix oromatcher dependency --- include/kotlin-compiler/build.gradle.kts.181 | 45 ++++++++++++++++++++ versions.gradle.kts.181 | 1 + 2 files changed, 46 insertions(+) create mode 100644 include/kotlin-compiler/build.gradle.kts.181 diff --git a/include/kotlin-compiler/build.gradle.kts.181 b/include/kotlin-compiler/build.gradle.kts.181 new file mode 100644 index 00000000000..23db7d5dceb --- /dev/null +++ b/include/kotlin-compiler/build.gradle.kts.181 @@ -0,0 +1,45 @@ + +plugins { + kotlin("jvm") +} + +val compile by configurations +val fatJarContents by configurations.creating +val fatJarContentsStripMetadata by configurations.creating +val fatJarContentsStripServices by configurations.creating + +val compilerModules: Array by rootProject.extra +val compilerManifestClassPath = "kotlin-stdlib.jar kotlin-reflect.jar kotlin-script-runtime.jar" + +dependencies { + compilerModules.forEach { module -> + compile(project(module)) { isTransitive = false } + } + + fatJarContents(project(":core:builtins", configuration = "builtins")) + fatJarContents(commonDep("javax.inject")) + fatJarContents(commonDep("org.jline", "jline")) + fatJarContents(commonDep("org.fusesource.jansi", "jansi")) + fatJarContents(protobufFull()) + fatJarContents(commonDep("com.google.code.findbugs", "jsr305")) + fatJarContents(commonDep("io.javaslang", "javaslang")) + fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } + + fatJarContents(intellijCoreDep()) { includeJars("intellij-core") } + fatJarContents(intellijDep()) { includeIntellijCoreJarDependencies(project, { !(it.startsWith("jdom") || it.startsWith("log4j")) }) } + fatJarContents(intellijDep()) { includeJars("jna-platform") } + fatJarContentsStripServices(intellijDep("jps-standalone")) { includeJars("jps-model") } + fatJarContentsStripMetadata(intellijDep()) { includeJars("oro", "jdom", "log4j", rootProject = rootProject) } +} + +val jar: Jar by tasks +jar.apply { + dependsOn(fatJarContents) + from(compile.filter { it.extension == "jar" }.map { zipTree(it) }) + from(fatJarContents.map { zipTree(it) }) + from(fatJarContentsStripServices.map { zipTree(it) }) { exclude("META-INF/services/**") } + from(fatJarContentsStripMetadata.map { zipTree(it) }) { exclude("META-INF/jb/** META-INF/LICENSE") } + + manifest.attributes["Class-Path"] = compilerManifestClassPath + manifest.attributes["Main-Class"] = "org.jetbrains.kotlin.cli.jvm.K2JVMCompiler" +} \ No newline at end of file diff --git a/versions.gradle.kts.181 b/versions.gradle.kts.181 index 929a49bc3f1..ea9d048531c 100644 --- a/versions.gradle.kts.181 +++ b/versions.gradle.kts.181 @@ -31,6 +31,7 @@ when (platform) { extra["versions.jar.kxml2"] = "2.3.0" extra["versions.jar.streamex"] = "0.6.5" extra["versions.jar.gson"] = "2.8.2" + extra["versions.jar.oro"] = "2.0.8" for (jar in gradleJars) { extra["versions.jar.$jar"] = "4.4" }