From ec0fbbe6328229a78c31209698bb399d6f58455a Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Wed, 2 Aug 2017 12:26:50 +0200 Subject: [PATCH] Implement Gradle Kotlin DSL build Original commit: 61dfb75e0e1e8df53980754c8675184f686ea093 --- jps/jps-common/build.gradle.kts | 16 +++++++++++ jps/jps-plugin/build.gradle.kts | 51 +++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 jps/jps-common/build.gradle.kts create mode 100644 jps/jps-plugin/build.gradle.kts diff --git a/jps/jps-common/build.gradle.kts b/jps/jps-common/build.gradle.kts new file mode 100644 index 00000000000..49962609981 --- /dev/null +++ b/jps/jps-common/build.gradle.kts @@ -0,0 +1,16 @@ + +apply { plugin("kotlin") } + +dependencies { + val compile by configurations + compile(project(":kotlin-stdlib")) + compile(project(":compiler:util")) + compile(project(":compiler:cli-common")) + compile(project(":compiler:frontend.java")) + compile(ideaSdkCoreDeps("intellij-core", "util")) + buildVersion() +} + +configureKotlinProjectSourcesDefault() +configureKotlinProjectNoTests() + diff --git a/jps/jps-plugin/build.gradle.kts b/jps/jps-plugin/build.gradle.kts new file mode 100644 index 00000000000..1576eaf54a2 --- /dev/null +++ b/jps/jps-plugin/build.gradle.kts @@ -0,0 +1,51 @@ +apply { + plugin("kotlin") +} + +dependencies { + val compile by configurations + val compileOnly by configurations + val testCompile by configurations + val testCompileOnly by configurations + val testRuntime by configurations + testRuntime(ideaSdkCoreDeps("*.jar")) + testRuntime(ideaSdkDeps("*.jar")) + testRuntime(ideaSdkDeps("*.jar", subdir = "jps/test")) + testRuntime(ideaSdkDeps("*.jar", subdir = "jps")) + compile(project(":build-common")) + compile(project(":core")) + compile(project(":compiler:compiler-runner")) + compile(project(":compiler:daemon-common")) + compile(project(":compiler:daemon-client")) + compile(project(":compiler:frontend.java")) + compile(project(":compiler:preloader")) + compile(project(":idea:idea-jps-common")) + compile(ideaSdkDeps("jps-builders", "jps-builders-6", subdir = "jps")) + buildVersion() + testCompile(project(":compiler.tests-common")) + testCompile(project(":compiler:incremental-compilation-impl")) + testCompileOnly(ideaSdkDeps("jps-build-test", subdir = "jps/test")) + testCompile(commonDep("junit:junit")) + testCompile(project(":kotlin-test:kotlin-test-jvm")) + testCompile(projectTests(":build-common")) + (rootProject.extra["compilerModules"] as Array).forEach { + testRuntime(project(it)) + } +} + +configureKotlinProjectSourcesDefault() +configureKotlinProjectResourcesDefault() +configureKotlinProjectTests("test", sourcesBaseDir = File(projectDir, "jps-tests")) +configureKotlinProjectTestResources("testData") + + +tasks.withType { + jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true") + maxHeapSize = "1200m" + workingDir = rootDir + systemProperty("idea.is.unit.test", "true") + forkEvery = 100 + ignoreFailures = true +} + +testsJar {}