Continue switching projects to improved dsl: sourceSets and test running
This commit is contained in:
+16
-36
@@ -2,14 +2,6 @@
|
||||
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(ideaSdkDeps("*.jar"))
|
||||
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":core"))
|
||||
compile(project(":compiler:backend"))
|
||||
@@ -64,6 +56,8 @@ dependencies {
|
||||
|
||||
testCompileOnly(ideaSdkDeps("groovy-all", "velocity", "gson", "jsr305"))
|
||||
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
|
||||
testRuntime(ideaPluginDeps("resources_en", plugin = "junit"))
|
||||
testRuntime(ideaPluginDeps("jcommander", "resources_en", plugin = "testng"))
|
||||
testRuntime(ideaPluginDeps("resources_en", plugin = "properties"))
|
||||
@@ -90,41 +84,27 @@ dependencies {
|
||||
(rootProject.extra["compilerModules"] as Array<String>).forEach {
|
||||
testCompile(project(it))
|
||||
}
|
||||
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("src",
|
||||
"idea-maven/src",
|
||||
"idea-gradle/src",
|
||||
"idea-completion/src",
|
||||
"idea-live-templates/src",
|
||||
"idea-repl/src")
|
||||
configure<JavaPluginConvention> {
|
||||
sourceSets["main"].apply {
|
||||
resources {
|
||||
srcDir(File(projectDir, "resources"))
|
||||
.include("**")
|
||||
srcDir(File(projectDir, "src"))
|
||||
.include("META-INF/**",
|
||||
"**/*.properties")
|
||||
}
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDirs("idea-maven/src",
|
||||
"idea-gradle/src",
|
||||
"idea-completion/src",
|
||||
"idea-live-templates/src",
|
||||
"idea-repl/src")
|
||||
}
|
||||
"test" {
|
||||
java.srcDirs("tests",
|
||||
"idea-maven/test",
|
||||
"idea-completion/tests")
|
||||
}
|
||||
}
|
||||
configureKotlinProjectTests("tests",
|
||||
"idea-maven/test",
|
||||
"idea-completion/tests")
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
|
||||
maxHeapSize = "1200m"
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user