提交 336e24b8 编写于 作者: I Ilya Chernikov

Fix project structure after rebase on master

上级 d0b87675
......@@ -8,6 +8,7 @@ dependencies {
compile(project(":compiler:util"))
compile(project(":compiler:cli-common"))
compile(project(":compiler:frontend.java"))
compile(project(":js:js.serializer"))
compile(ideaSdkDeps("util"))
testCompile(commonDep("junit:junit"))
testCompile(project(":compiler.tests-common"))
......
......@@ -99,7 +99,7 @@ extra["versions.javaslang"] = "2.0.6"
extra["versions.ant"] = "1.8.2"
extra["ideaCoreSdkJars"] = arrayOf("annotations", "asm-all", "guava", "intellij-core", "jdom", "jna", "log4j", "picocontainer",
"snappy-in-java", "trove4j", "xpp3-1.1.4-min", "xstream")
"snappy-in-java", "streamex", "trove4j", "xpp3-1.1.4-min", "xstream")
extra["compilerModules"] = arrayOf(":compiler:util",
":compiler:container",
......@@ -179,6 +179,7 @@ allprojects {
tasks.withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs = listOf("-Xallow-kotlin-package", "-module-name", project.name)
kotlinOptions.jvmTarget = "1.8"
}
tasks.withType<Kotlin2JsCompile> {
......
......@@ -9,8 +9,12 @@ dependencies {
compile(project(":compiler:frontend.java"))
compile(project(":compiler:cli"))
compile(project(":kotlin-build-common"))
testCompile(project(":kotlin-test:kotlin-test-junit"))
testCompile(project(":kotlin-stdlib"))
testCompile(projectTests(":kotlin-build-common"))
}
configureKotlinProjectSourcesDefault()
configureKotlinProjectTestsDefault()
testsJar()
......@@ -73,8 +73,6 @@ dependencies {
testRuntime(ideaPluginDeps("*.jar", plugin = "maven"))
testRuntime(ideaPluginDeps("*.jar", plugin = "android"))
testRuntime(preloadedDeps("uast-common", "uast-java"))
// deps below are test runtime deps, but made test compile to split compilation and running to reduce mem req
testCompile(project(":android-extensions-compiler"))
testCompile(project(":plugins:android-extensions-idea")) { isTransitive = false }
......@@ -98,6 +96,7 @@ dependencies {
configureKotlinProjectSources("src",
"idea-maven/src",
"idea-gradle/src",
"idea-completion/src",
"idea-live-templates/src",
"idea-repl/src")
......
......@@ -17,8 +17,7 @@ dependencies {
compile(project(":idea:ide-common"))
compile(ideaSdkDeps("openapi", "idea"))
compile(ideaPluginDeps("gradle-tooling-api", plugin = "gradle"))
compile(ideaPluginDeps("android", "common", "sdklib", "sdk-common", "layoutlib-api", plugin = "android"))
compile(preloadedDeps("uast-common", "uast-java"))
compile(ideaPluginDeps("android", "android-common", "sdklib", "sdk-common", "layoutlib-api", plugin = "android"))
compile(preloadedDeps("dx", subdir = "android-5.0/lib"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
......@@ -26,11 +25,9 @@ dependencies {
testCompile(project(":idea:idea-test-framework")) { isTransitive = false }
testCompile(project(":plugins:lint")) { isTransitive = false }
testCompile(projectTests(":idea"))
testCompile(ideaPluginDeps("android-common", "sdklib", plugin = "android"))
testCompile(ideaPluginDeps("properties", plugin = "properties"))
testCompile(ideaSdkDeps("gson"))
testRuntime(preloadedDeps("uast-common", "uast-java"))
testRuntime(project(":plugins:android-extensions-idea"))
testRuntime(project(":plugins:sam-with-receiver-ide"))
testRuntime(project(":plugins:noarg-ide"))
......
......@@ -6,7 +6,7 @@ dependencies {
compile(project(":compiler:util"))
compile(ideaSdkCoreDeps("intellij-core"))
compile(ideaPluginDeps("gradle-tooling-api", plugin = "gradle"))
compile(ideaPluginDeps("android", "common", "sdk-common", plugin = "android"))
compile(ideaPluginDeps("android", "android-common", "sdk-common", plugin = "android"))
}
configureKotlinProjectSourcesDefault()
......
......@@ -16,7 +16,7 @@ dependencies {
compile(ideaSdkCoreDeps("intellij-core", "util"))
compile(ideaSdkDeps("openapi", "idea"))
compile(ideaPluginDeps("gradle-tooling-api", "gradle", plugin = "gradle"))
compile(preloadedDeps("uast-common", "kotlinx-coroutines-core", "kotlinx-coroutines-jdk8"))
compile(preloadedDeps("kotlinx-coroutines-core", "kotlinx-coroutines-jdk8"))
buildVersion()
}
......@@ -25,3 +25,5 @@ configureKotlinProjectResources("idea-analysis/src", sourcesBaseDir = File(rootD
include("**/*.properties")
}
configureKotlinProjectNoTests()
......@@ -42,7 +42,6 @@ dependencies {
// testRuntime(ideaPluginDeps("*.jar", plugin = "java-i18n"))
// testRuntime(ideaPluginDeps("*.jar", plugin = "coverage"))
// testRuntime(ideaPluginDeps("*.jar", plugin = "java-decompiler"))
// testRuntime(preloadedDeps("uast-common", "uast-java"))
buildVersion()
}
......
......@@ -14,6 +14,7 @@ dependencies {
compile(ideaSdkDeps("jps-builders", "jps-builders-6", subdir = "jps"))
testCompile(project(":compiler.tests-common"))
testCompile(project(":compiler:incremental-compilation-impl"))
testCompile(projectTests(":compiler:incremental-compilation-impl"))
testCompileOnly(ideaSdkDeps("jps-build-test", subdir = "jps/test"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
......
......@@ -57,6 +57,7 @@ ext.configureJvm6Project = { Project project ->
tasks.withType(project.compileKotlin.class) {
kotlinOptions.jdkHome = JDK_16
kotlinOptions.jvmTarget = "1.6"
doFirst {
System.setProperty("kotlin.colors.enabled", "false")
}
......
......@@ -11,8 +11,7 @@ dependencies {
compile(project(":idea:idea-core"))
compile(project(":idea:idea-android"))
compile(project(":plugins:uast-kotlin"))
compile(preloadedDeps("uast-common", "uast-java"))
compile(ideaPluginDeps("android", "android-common", "common", "sdk-common", "sdklib", "sdk-tools", "repository", "lombok-ast", "kxml2", plugin = "android"))
compile(ideaPluginDeps("android", "android-common", "sdk-common", "sdklib", "sdk-tools", "repository", "lombok-ast", "kxml2", plugin = "android"))
compile(ideaSdkCoreDeps("intellij-core", "util"))
compile(ideaSdkDeps("guava"))
}
......
......@@ -9,7 +9,6 @@ dependencies {
compile(project(":compiler:frontend.java"))
compile(project(":idea:ide-common"))
compile(project(":plugins:uast-kotlin"))
compile(preloadedDeps("uast-common", "uast-java"))
buildVersion()
}
......
......@@ -13,7 +13,7 @@ dependencies {
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:light-classes"))
compile(preloadedDeps("uast-common", "uast-java"))
compileOnly(ideaSdkDeps("openapi", "idea"))
buildVersion()
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(project(":compiler.tests-common"))
......
......@@ -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())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册