Fix project structure after rebase on master
This commit is contained in:
@@ -53,6 +53,9 @@ val packagesToRelocate =
|
||||
"javax.inject",
|
||||
"org.fusesource")
|
||||
|
||||
val ideaCoreSdkJars: Array<String> by rootProject.extra
|
||||
val coreSdkJarsSimple = ideaCoreSdkJars.filterNot { it == "jdom" || it == "log4j" }.toTypedArray()
|
||||
|
||||
fun firstFromJavaHomeThatExists(vararg paths: String): File =
|
||||
paths.mapNotNull { File(javaHome, it).takeIf { it.exists() } }.firstOrNull()
|
||||
?: throw GradleException("Cannot find under '$javaHome' neither of: ${paths.joinToString()}")
|
||||
@@ -73,9 +76,8 @@ dependencies {
|
||||
// buildVersion()
|
||||
|
||||
fatJarContents(project(":core:builtins", configuration = "builtins"))
|
||||
fatJarContents(ideaSdkCoreDeps(*(rootProject.extra["ideaCoreSdkJars"] as Array<String>)))
|
||||
fatJarContents(ideaSdkDeps("jna-platform", "oromatcher"))
|
||||
fatJarContents(ideaSdkDeps("jps-model.jar", subdir = "jps"))
|
||||
fatJarContents(ideaSdkCoreDeps(*coreSdkJarsSimple))
|
||||
fatJarContents(ideaSdkDeps("jna-platform"))
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(protobufFull())
|
||||
@@ -106,6 +108,9 @@ val packCompiler by task<ShadowJar> {
|
||||
|
||||
setupPublicJar("before-proguard", "")
|
||||
from(fatJarContents)
|
||||
ideaSdkDeps("jps-model.jar", subdir = "jps").forEach { from(it) { exclude("META-INF/services/**") } }
|
||||
ideaSdkDeps("oromatcher").forEach { from(it) { exclude("META-INF/jb/** META-INF/LICENSE") } }
|
||||
ideaSdkCoreDeps("jdom", "log4j").forEach { from(it) { exclude("META-INF/jb/** META-INF/LICENSE") } }
|
||||
|
||||
manifest.attributes.put("Class-Path", compilerManifestClassPath)
|
||||
manifest.attributes.put("Main-Class", "org.jetbrains.kotlin.cli.jvm.K2JVMCompiler")
|
||||
|
||||
@@ -57,7 +57,7 @@ dependencies {
|
||||
sideJars(project(":kotlin-script-runtime"))
|
||||
sideJars(commonDep("io.javaslang", "javaslang"))
|
||||
sideJars(commonDep("javax.inject"))
|
||||
sideJars(preloadedDeps("markdown", "kotlinx-coroutines-core", "kotlinx-coroutines-jdk8", "uast-java"))
|
||||
sideJars(preloadedDeps("markdown", "kotlinx-coroutines-core", "kotlinx-coroutines-jdk8"))
|
||||
}
|
||||
|
||||
val targetJar = File(buildDir, "libs", "kotlin-plugin.jar")
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
import org.gradle.api.internal.HasConvention
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
@@ -34,6 +35,17 @@ configure<JavaPluginConvention> {
|
||||
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
targetCompatibility = "1.6"
|
||||
// options.fork = true
|
||||
options.forkOptions.javaHome = file(rootProject.extra["JDK_16"] as String)
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "1.6"
|
||||
kotlinOptions.jdkHome = rootProject.extra["JDK_16"] as String
|
||||
}
|
||||
|
||||
task<Copy>("dist") {
|
||||
into(rootProject.extra["distDir"].toString())
|
||||
|
||||
Reference in New Issue
Block a user