diff --git a/idea/build.gradle.kts.as31 b/idea/build.gradle.kts.as31 new file mode 100644 index 00000000000..df790f5e333 --- /dev/null +++ b/idea/build.gradle.kts.as31 @@ -0,0 +1,126 @@ +import org.gradle.jvm.tasks.Jar + +plugins { + kotlin("jvm") + id("jps-compatible") +} + +dependencies { + testRuntime(intellijDep()) + + compile(project(":kotlin-stdlib")) + compileOnly(project(":kotlin-reflect-api")) + compile(project(":core:descriptors")) + compile(project(":core:descriptors.jvm")) + compile(project(":compiler:backend")) + compile(project(":compiler:cli-common")) + compile(project(":compiler:frontend")) + compile(project(":compiler:frontend.java")) + compile(project(":compiler:frontend.script")) + compile(project(":js:js.frontend")) + compile(project(":js:js.serializer")) + compile(project(":compiler:light-classes")) + compile(project(":compiler:util")) + compile(project(":kotlin-build-common")) + compile(project(":compiler:daemon-common")) + compile(projectRuntimeJar(":kotlin-daemon-client")) + compile(project(":kotlin-compiler-runner")) { isTransitive = false } + compile(project(":compiler:plugin-api")) + compile(project(":eval4j")) + compile(project(":j2k")) + compile(project(":idea:formatter")) + compile(project(":idea:idea-core")) + compile(project(":idea:ide-common")) + compile(project(":idea:idea-jps-common")) + compile(project(":idea:kotlin-gradle-tooling")) + compile(project(":plugins:uast-kotlin")) + compile(project(":plugins:uast-kotlin-idea")) + compile(project(":kotlin-script-util")) { isTransitive = false } + + compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } + compile(commonDep("org.jetbrains", "markdown")) + + compileOnly(project(":kotlin-daemon-client")) + + compileOnly(intellijDep()) + compileOnly(commonDep("com.google.code.findbugs", "jsr305")) + compileOnly(intellijPluginDep("IntelliLang")) + compileOnly(intellijPluginDep("copyright")) + compileOnly(intellijPluginDep("properties")) + compileOnly(intellijPluginDep("java-i18n")) + + testCompile(project(":kotlin-test:kotlin-test-junit")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false } + testCompile(project(":idea:idea-jvm")) { isTransitive = false } + testCompile(project(":idea:idea-gradle")) { isTransitive = false } + testCompile(project(":idea:idea-maven")) { isTransitive = false } + testCompile(commonDep("junit:junit")) + + testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false } + testRuntime(projectDist(":kotlin-reflect")) + testRuntime(projectDist(":kotlin-preloader")) + + testCompile(project(":kotlin-sam-with-receiver-compiler-plugin")) { isTransitive = false } + + testRuntime(project(":plugins:android-extensions-compiler")) + testRuntime(project(":plugins:android-extensions-ide")) { isTransitive = false } + testRuntime(project(":allopen-ide-plugin")) { isTransitive = false } + testRuntime(project(":kotlin-allopen-compiler-plugin")) + testRuntime(project(":noarg-ide-plugin")) { isTransitive = false } + testRuntime(project(":kotlin-noarg-compiler-plugin")) + testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false } + testRuntime(project(":sam-with-receiver-ide-plugin")) { isTransitive = false } + testRuntime(project(":idea:idea-android")) { isTransitive = false } + testRuntime(project(":plugins:lint")) { isTransitive = false } + testRuntime(project(":plugins:uast-kotlin")) + + (rootProject.extra["compilerModules"] as Array).forEach { + testRuntime(project(it)) + } + + testCompile(intellijPluginDep("IntelliLang")) + testCompile(intellijPluginDep("copyright")) + testCompile(intellijPluginDep("properties")) + testCompile(intellijPluginDep("java-i18n")) + testCompileOnly(intellijDep()) + testCompileOnly(commonDep("com.google.code.findbugs", "jsr305")) + testCompileOnly(intellijPluginDep("gradle")) + testCompileOnly(intellijPluginDep("Groovy")) + //testCompileOnly(intellijPluginDep("maven")) + + testRuntime(intellijPluginDep("junit")) + testRuntime(intellijPluginDep("gradle")) + testRuntime(intellijPluginDep("Groovy")) + testRuntime(intellijPluginDep("coverage")) + //testRuntime(intellijPluginDep("maven")) + testRuntime(intellijPluginDep("android")) + testRuntime(intellijPluginDep("testng")) +} + +sourceSets { + "main" { + projectDefault() + java.srcDirs("idea-completion/src", + "idea-live-templates/src", + "idea-repl/src") + resources.srcDirs("idea-repl/src").apply { include("META-INF/**") } + } + "test" { + projectDefault() + java.srcDirs( + "idea-completion/tests", + "idea-live-templates/tests") + } +} + +projectTest { + dependsOn(":dist") + workingDir = rootDir +} + +testsJar {} + +classesDirsArtifact() +configureInstrumentation() + diff --git a/idea/idea-android/build.gradle.kts.as31 b/idea/idea-android/build.gradle.kts.as31 new file mode 100644 index 00000000000..58b6a02ab98 --- /dev/null +++ b/idea/idea-android/build.gradle.kts.as31 @@ -0,0 +1,73 @@ + +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + kotlin("jvm") + id("jps-compatible") +} + +dependencies { + testRuntime(intellijDep()) + + compileOnly(project(":kotlin-reflect-api")) + compile(project(":compiler:util")) + compile(project(":compiler:light-classes")) + compile(project(":compiler:frontend")) + compile(project(":compiler:frontend.java")) + compile(project(":idea")) + compile(project(":idea:idea-jvm")) + compile(project(":idea:idea-core")) + compile(project(":idea:ide-common")) + compile(project(":idea:idea-gradle")) + + compile(androidDxJar()) + + compileOnly(project(":kotlin-android-extensions-runtime")) + compileOnly(intellijDep()) + compileOnly(intellijPluginDep("android")) + + testCompile(projectDist(":kotlin-test:kotlin-test-jvm")) + testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false } + testCompile(project(":plugins:lint")) { isTransitive = false } + testCompile(project(":idea:idea-jvm")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(projectTests(":idea")) + testCompile(projectTests(":idea:idea-gradle")) + testCompile(commonDep("junit:junit")) + + testCompile(intellijDep()) + testCompile(intellijPluginDep("properties")) + testCompileOnly(intellijPluginDep("android")) + + testRuntime(projectDist(":kotlin-reflect")) + testRuntime(project(":plugins:android-extensions-ide")) + testRuntime(project(":plugins:kapt3-idea")) + testRuntime(project(":sam-with-receiver-ide-plugin")) + testRuntime(project(":noarg-ide-plugin")) + testRuntime(project(":allopen-ide-plugin")) + + testRuntime(intellijPluginDep("android")) + testRuntime(intellijPluginDep("copyright")) + testRuntime(intellijPluginDep("coverage")) + testRuntime(intellijPluginDep("gradle")) + testRuntime(intellijPluginDep("Groovy")) + testRuntime(intellijPluginDep("IntelliLang")) + testRuntime(intellijPluginDep("java-decompiler")) + testRuntime(intellijPluginDep("java-i18n")) + testRuntime(intellijPluginDep("junit")) + //testRuntime(intellijPluginDep("maven")) + testRuntime(intellijPluginDep("testng")) +} + +sourceSets { + "main" { projectDefault() } + "test" { projectDefault() } +} + +projectTest { + workingDir = rootDir + useAndroidSdk() +} + +testsJar {} + diff --git a/idea/idea-gradle/build.gradle.kts.as31 b/idea/idea-gradle/build.gradle.kts.as31 new file mode 100644 index 00000000000..bc1450de059 --- /dev/null +++ b/idea/idea-gradle/build.gradle.kts.as31 @@ -0,0 +1,66 @@ +plugins { + kotlin("jvm") + id("jps-compatible") +} + +dependencies { + testRuntime(intellijDep()) + + compileOnly(project(":idea")) + compileOnly(project(":idea:idea-jvm")) + compile(project(":idea:kotlin-gradle-tooling")) + + compile(project(":compiler:frontend")) + compile(project(":compiler:frontend.java")) + compile(project(":compiler:frontend.script")) + + compile(project(":js:js.frontend")) + + compileOnly(intellijDep()) + compileOnly(intellijPluginDep("gradle")) + compileOnly(intellijPluginDep("Groovy")) + compileOnly(intellijPluginDep("junit")) + + testCompile(projectTests(":idea")) + testCompile(projectTests(":idea:idea-test-framework")) + + testCompile(intellijPluginDep("gradle")) + testCompileOnly(intellijPluginDep("Groovy")) + testCompileOnly(intellijDep()) + + testRuntime(projectDist(":kotlin-reflect")) + testRuntime(project(":idea:idea-jvm")) + testRuntime(project(":idea:idea-android")) + testRuntime(project(":plugins:kapt3-idea")) + testRuntime(project(":plugins:android-extensions-ide")) + testRuntime(project(":plugins:lint")) + testRuntime(project(":sam-with-receiver-ide-plugin")) + testRuntime(project(":allopen-ide-plugin")) + testRuntime(project(":noarg-ide-plugin")) + // TODO: the order of the plugins matters here, consider avoiding order-dependency + testRuntime(intellijPluginDep("junit")) + testRuntime(intellijPluginDep("testng")) + testRuntime(intellijPluginDep("properties")) + testRuntime(intellijPluginDep("gradle")) + testRuntime(intellijPluginDep("Groovy")) + testRuntime(intellijPluginDep("coverage")) + //testRuntime(intellijPluginDep("maven")) + testRuntime(intellijPluginDep("android")) +} + +sourceSets { + "main" { + projectDefault() + resources.srcDir("res").apply { include("**") } + } + "test" { projectDefault() } +} + +testsJar() + +projectTest { + workingDir = rootDir + useAndroidSdk() +} + +configureInstrumentation() diff --git a/idea/idea-maven/build.gradle.kts.as31 b/idea/idea-maven/build.gradle.kts.as31 index 56c8def183a..fc94dc793da 100644 --- a/idea/idea-maven/build.gradle.kts.as31 +++ b/idea/idea-maven/build.gradle.kts.as31 @@ -26,7 +26,7 @@ dependencies { testCompile(projectTests(":idea:idea-test-framework")) testCompileOnly(intellijDep()) - testCompileOnly(intellijPluginDep("maven")) + //testCompileOnly(intellijPluginDep("maven")) testRuntime(projectDist(":kotlin-reflect")) testRuntime(project(":idea:idea-jvm")) @@ -45,7 +45,7 @@ dependencies { testRuntime(intellijPluginDep("gradle")) testRuntime(intellijPluginDep("Groovy")) testRuntime(intellijPluginDep("coverage")) - testRuntime(intellijPluginDep("maven")) + //testRuntime(intellijPluginDep("maven")) testRuntime(intellijPluginDep("android")) } diff --git a/j2k/build.gradle.kts.as31 b/j2k/build.gradle.kts.as31 new file mode 100644 index 00000000000..cbd5700a712 --- /dev/null +++ b/j2k/build.gradle.kts.as31 @@ -0,0 +1,73 @@ + +plugins { + kotlin("jvm") + id("jps-compatible") +} + +dependencies { + testRuntime(intellijDep()) + + compile(projectDist(":kotlin-stdlib")) + compile(project(":compiler:frontend")) + compile(project(":compiler:frontend.java")) + compile(project(":compiler:light-classes")) + compile(project(":compiler:util")) + compileOnly(intellijCoreDep()) { includeJars("intellij-core") } + + testCompile(project(":idea")) + testCompile(projectTests(":idea:idea-test-framework")) + testCompile(project(":compiler:light-classes")) + testCompile(projectDist(":kotlin-test:kotlin-test-junit")) + testCompile(commonDep("junit:junit")) + + testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false } + testRuntime(project(":idea:idea-jvm")) + testRuntime(project(":idea:idea-android")) + testRuntime(project(":plugins:android-extensions-ide")) + testRuntime(project(":sam-with-receiver-ide-plugin")) + testRuntime(project(":allopen-ide-plugin")) + testRuntime(project(":noarg-ide-plugin")) + testRuntime(intellijPluginDep("properties")) + testRuntime(intellijPluginDep("gradle")) + testRuntime(intellijPluginDep("Groovy")) + testRuntime(intellijPluginDep("coverage")) + //testRuntime(intellijPluginDep("maven")) + testRuntime(intellijPluginDep("android")) + testRuntime(intellijPluginDep("junit")) + testRuntime(intellijPluginDep("testng")) + testRuntime(intellijPluginDep("IntelliLang")) + testRuntime(intellijPluginDep("testng")) + testRuntime(intellijPluginDep("copyright")) + testRuntime(intellijPluginDep("properties")) + testRuntime(intellijPluginDep("java-i18n")) + testRuntime(intellijPluginDep("java-decompiler")) +} + +sourceSets { + "main" { projectDefault() } + "test" { projectDefault() } +} + +projectTest { + dependsOn(":dist") + workingDir = rootDir +} + +testsJar() + + +val testForWebDemo by task { + include("**/*JavaToKotlinConverterForWebDemoTestGenerated*") + classpath = the().sourceSets["test"].runtimeClasspath + workingDir = rootDir +} +val cleanTestForWebDemo by tasks + +val test: Test by tasks +test.apply { + exclude("**/*JavaToKotlinConverterForWebDemoTestGenerated*") + dependsOn(testForWebDemo) +} +val cleanTest by tasks +cleanTest.dependsOn(cleanTestForWebDemo) + diff --git a/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as31 b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as31 new file mode 100644 index 00000000000..0a72e4e82a2 --- /dev/null +++ b/plugins/android-extensions/android-extensions-idea/build.gradle.kts.as31 @@ -0,0 +1,74 @@ + +description = "Kotlin Android Extensions IDEA" + +plugins { + kotlin("jvm") + id("jps-compatible") +} + +jvmTarget = "1.6" + +dependencies { + testRuntime(intellijDep()) + + compile(project(":compiler:util")) + compile(project(":compiler:light-classes")) + compile(project(":idea:idea-core")) + compile(project(":idea")) + compile(project(":idea:idea-jvm")) + compile(project(":idea:idea-gradle")) + compile(project(":plugins:android-extensions-compiler")) + compileOnly(project(":kotlin-android-extensions-runtime")) + compileOnly(intellijPluginDep("android")) + compileOnly(intellijPluginDep("Groovy")) + compileOnly(intellijDep()) + + testCompile(project(":compiler:tests-common")) + testCompile(project(":compiler:cli")) + testCompile(project(":compiler:frontend.java")) + testCompile(projectTests(":idea:idea-test-framework")) { isTransitive = false } + testCompile(project(":plugins:kapt3-idea")) + testCompile(projectTests(":compiler:tests-common")) + testCompile(projectTests(":idea")) + testCompile(projectTests(":idea:idea-android")) + testCompile(projectDist(":kotlin-test:kotlin-test-jvm")) + testCompile(commonDep("junit:junit")) + testRuntime(projectDist(":kotlin-reflect")) + testCompile(intellijPluginDep("android")) + testCompile(intellijPluginDep("Groovy")) + testCompile(intellijDep()) + + testRuntime(project(":idea:idea-jvm")) + testRuntime(project(":plugins:android-extensions-jps")) + testRuntime(project(":sam-with-receiver-ide-plugin")) + testRuntime(project(":noarg-ide-plugin")) + testRuntime(project(":allopen-ide-plugin")) + testRuntime(project(":plugins:lint")) + testRuntime(intellijPluginDep("junit")) + testRuntime(intellijPluginDep("IntelliLang")) + testRuntime(intellijPluginDep("properties")) + testRuntime(intellijPluginDep("java-i18n")) + testRuntime(intellijPluginDep("gradle")) + testRuntime(intellijPluginDep("Groovy")) + testRuntime(intellijPluginDep("java-decompiler")) + //testRuntime(intellijPluginDep("maven")) + testRuntime(intellijPluginDep("android")) +} + +sourceSets { + "main" { projectDefault() } + "test" { projectDefault() } +} + +testsJar {} + +projectTest { + dependsOn(":kotlin-android-extensions-runtime:dist") + workingDir = rootDir + useAndroidSdk() + useAndroidJar() +} + +runtimeJar() + +ideaPlugin() diff --git a/versions.gradle.kts.as31 b/versions.gradle.kts.as31 new file mode 100644 index 00000000000..c90b01ff3e0 --- /dev/null +++ b/versions.gradle.kts.as31 @@ -0,0 +1,107 @@ + +extra["versions.intellijSdk"] = "173.3727.127" +extra["versions.androidBuildTools"] = "r23.0.1" +extra["versions.idea.NodeJS"] = "172.3757.32" +extra["versions.androidStudioRelease"] = "3.1.0.7" +extra["versions.androidStudioBuild"] = "173.4529993" + +val gradleJars = listOf( + "gradle-api", + "gradle-tooling-api", + "gradle-base-services", + "gradle-wrapper", + "gradle-core", + "gradle-base-services-groovy" +) + +val androidStudioVersion = if (extra.has("versions.androidStudioRelease")) + extra["versions.androidStudioRelease"]?.toString()?.replace(".", "")?.substring(0, 2) +else + null + +val platform = androidStudioVersion?.let { "AS" + it } + ?: extra["versions.intellijSdk"].toString().substringBefore('.') + +when (platform) { + "181" -> { + extra["versions.jar.guava"] = "21.0" + extra["versions.jar.groovy-all"] = "2.4.12" + extra["versions.jar.lombok-ast"] = "0.2.3" + extra["versions.jar.swingx-core"] = "1.6.2-2" + extra["versions.jar.kxml2"] = "2.3.0" + extra["versions.jar.streamex"] = "0.6.5" + extra["versions.jar.gson"] = "2.8.2" + for (jar in gradleJars) { + extra["versions.jar.$jar"] = "4.4" + } + } + "173" -> { + extra["versions.jar.guava"] = "21.0" + extra["versions.jar.groovy-all"] = "2.4.12" + extra["versions.jar.lombok-ast"] = "0.2.3" + extra["versions.jar.swingx-core"] = "1.6.2" + extra["versions.jar.kxml2"] = "2.3.0" + extra["versions.jar.streamex"] = "0.6.5" + extra["versions.jar.gson"] = "2.8.2" + for (jar in gradleJars) { + extra["versions.jar.$jar"] = "4.0" + } + extra["ignore.jar.lombok-ast-0.2.3"] = true + } + "172" -> { + extra["versions.jar.guava"] = "21.0" + extra["versions.jar.groovy-all"] = "2.4.6" + extra["versions.jar.lombok-ast"] = "0.2.3" + extra["versions.jar.swingx-core"] = "1.6.2" + extra["versions.jar.kxml2"] = "2.3.0" + extra["versions.jar.streamex"] = "0.6.2" + extra["versions.jar.gson"] = "2.5" + for (jar in gradleJars) { + extra["versions.jar.$jar"] = "3.5" + } + } + "171" -> { + extra["versions.jar.guava"] = "19.0" + extra["versions.jar.groovy-all"] = "2.4.6" + extra["versions.jar.lombok-ast"] = "0.2.3" + extra["versions.jar.swingx-core"] = "1.6.2" + extra["versions.jar.kxml2"] = "2.3.0" + extra["versions.jar.streamex"] = "0.6.2" + extra["versions.jar.gson"] = "2.5" + for (jar in gradleJars) { + extra["versions.jar.$jar"] = "3.3" + } + } + "AS30" -> { + extra["versions.jar.guava"] = "19.0" + extra["versions.jar.groovy-all"] = "2.4.6" + extra["versions.jar.lombok-ast"] = "0.2.3" + extra["versions.jar.swingx-core"] = "1.6.2" + extra["versions.jar.kxml2"] = "2.3.0" + extra["versions.jar.streamex"] = "0.6.2" + extra["versions.jar.gson"] = "2.5" + for (jar in gradleJars) { + extra["versions.jar.$jar"] = "3.5" + } + + extra["ignore.jar.common"] = true + } + "AS31" -> { + extra["versions.jar.guava"] = "21.0" + extra["versions.jar.groovy-all"] = "2.4.12" + extra["versions.jar.swingx-core"] = "1.6.2" + extra["versions.jar.kxml2"] = "2.3.0" + extra["versions.jar.streamex"] = "0.6.5" + extra["versions.jar.gson"] = "2.8.2" + for (jar in gradleJars) { + extra["versions.jar.$jar"] = "4.0" + } + + extra["ignore.jar.common"] = true + extra["ignore.jar.lombok-ast"] = true + } +} + +if (!extra.has("versions.androidStudioRelease")) { + extra["ignore.jar.android-base-common"] = true +}