Refactor: project renaming, using improved build dsl

Original commit: b6c255cea5
This commit is contained in:
Ilya Chernikov
2017-09-11 14:47:07 +02:00
parent c0563313a4
commit 5a8250a36d
+18 -28
View File
@@ -1,18 +1,9 @@
apply {
plugin("kotlin")
}
apply { plugin("kotlin") }
val compilerModules: Array<String> by rootProject.extra
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(":kotlin-build-common"))
compile(project(":core"))
compile(project(":compiler:compiler-runner"))
compile(project(":compiler:daemon-common"))
@@ -21,31 +12,30 @@ dependencies {
compile(project(":kotlin-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<String>).forEach {
testCompile(projectTests(":kotlin-build-common"))
compilerModules.forEach {
testRuntime(project(it))
}
testRuntime(ideaSdkCoreDeps("*.jar"))
testRuntime(ideaSdkDeps("*.jar"))
testRuntime(ideaSdkDeps("*.jar", subdir = "jps/test"))
testRuntime(ideaSdkDeps("*.jar", subdir = "jps"))
}
sourceSets {
"main" { projectDefault() }
"test" {
java.srcDirs("jps-tests/test")
}
}
configureKotlinProjectSourcesDefault()
configureKotlinProjectResourcesDefault()
configureKotlinProjectTests("test", sourcesBaseDir = File(projectDir, "jps-tests"))
configureKotlinProjectTestResources("testData")
tasks.withType<Test> {
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
maxHeapSize = "1200m"
projectTest {
workingDir = rootDir
systemProperty("idea.is.unit.test", "true")
forkEvery = 100
ignoreFailures = true
}
testsJar {}