Continue switching projects to improved dsl: sourceSets and test running
This commit is contained in:
+10
-8
@@ -12,14 +12,16 @@ dependencies {
|
||||
compile(commonDep("javax.inject"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources(
|
||||
"descriptor.loader.java/src",
|
||||
"descriptors/src",
|
||||
"descriptors.runtime/src",
|
||||
"deserialization/src")
|
||||
configureKotlinProjectResources(
|
||||
"descriptor.loader.java/src", "deserialization/src") { include("META-INF/**") }
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" {
|
||||
java.srcDirs("descriptor.loader.java/src",
|
||||
"descriptors/src",
|
||||
"descriptors.runtime/src",
|
||||
"deserialization/src")
|
||||
resources.srcDirs("descriptor.loader.java/src", "deserialization/src").apply { include("META-INF/**") }
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
dependsOn(protobufLiteTask)
|
||||
|
||||
@@ -20,9 +20,14 @@ dependencies {
|
||||
compile(files(builtinsSerialized))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("core/builtins/src", "core/runtime.jvm/src", sourcesBaseDir = rootDir)
|
||||
configureKotlinProjectResources(listOf(builtinsSerialized))
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDir("../runtime.jvm/src")
|
||||
resources.srcDir(builtinsSerialized).apply { include("**") }
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
val serialize = task("serialize") {
|
||||
val outDir = builtinsSerialized
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
import org.gradle.api.tasks.compile.JavaCompile
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.io.File
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
@@ -20,16 +19,6 @@ apply {
|
||||
plugin("com.github.johnrengelman.shadow")
|
||||
}
|
||||
|
||||
configure<JavaPluginConvention> {
|
||||
sourceSets.getByName("main")?.apply {
|
||||
val srcs = listOf(File(rootDir, "core/reflection.jvm/src"))
|
||||
java.setSrcDirs(srcs)
|
||||
}
|
||||
sourceSets.getByName("test").apply {
|
||||
java.setSrcDirs(emptyList<File>())
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core:builtins"))
|
||||
@@ -37,6 +26,11 @@ dependencies {
|
||||
compile(protobufLite())
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
dependsOn(protobufLiteTask)
|
||||
}
|
||||
@@ -44,5 +38,3 @@ tasks.withType<JavaCompile> {
|
||||
tasks.withType<KotlinCompile> {
|
||||
dependsOn(protobufLiteTask)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,10 @@ dependencies {
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
tasks.withType<Jar> {
|
||||
setupRuntimeJar("Kotlin Script Runtime")
|
||||
|
||||
@@ -5,11 +5,12 @@ apply {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core:builtins"))
|
||||
compile(project(":kotlin-stdlib"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user