Continue switching projects to improved dsl: sourceSets and test running
This commit is contained in:
@@ -11,7 +11,7 @@ dependencies {
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
runtimeJar {
|
||||
|
||||
@@ -1,83 +1,11 @@
|
||||
@file:Suppress("unused") // usages in build scripts are not tracked properly
|
||||
|
||||
import org.gradle.api.*
|
||||
import org.gradle.api.file.SourceDirectorySet
|
||||
import org.gradle.api.internal.HasConvention
|
||||
import org.gradle.api.plugins.JavaPluginConvention
|
||||
import org.gradle.api.tasks.*
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import java.io.File
|
||||
//import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
|
||||
|
||||
private fun Project.configureKotlinProjectSourceSet(srcs: Iterable<File>,
|
||||
sourceSetName: String,
|
||||
getSources: SourceSet.() -> SourceDirectorySet,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit) =
|
||||
configure<JavaPluginConvention> {
|
||||
// if (srcs.none()) {
|
||||
// sourceSets.removeIf { it.name == sourceSetName }
|
||||
// }
|
||||
// else {
|
||||
sourceSets.matching { it.name == sourceSetName }.forEach { it.getSources().setSrcDirs(srcs).configureSourceDirs() }
|
||||
// }
|
||||
}
|
||||
|
||||
private fun Project.configureKotlinProjectSourceSet(vararg srcs: String, sourceSetName: String,
|
||||
getSources: SourceSet.() -> SourceDirectorySet,
|
||||
sourcesBaseDir: File? = null,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectSourceSet(srcs.map { File(sourcesBaseDir ?: projectDir, it) }, sourceSetName, getSources, configureSourceDirs)
|
||||
|
||||
fun Project.configureKotlinProjectSources(vararg srcs: String,
|
||||
sourcesBaseDir: File? = null,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectSourceSet(*srcs, sourceSetName = "main", getSources = { this.java },
|
||||
sourcesBaseDir = sourcesBaseDir, configureSourceDirs = configureSourceDirs)
|
||||
|
||||
fun Project.configureKotlinProjectSources(srcs: Iterable<File>,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectSourceSet(srcs, sourceSetName = "main", getSources = { this.java }, configureSourceDirs = configureSourceDirs)
|
||||
|
||||
fun Project.configureKotlinProjectSourcesDefault(sourcesBaseDir: File? = null,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectSources("src", sourcesBaseDir = sourcesBaseDir, configureSourceDirs = configureSourceDirs)
|
||||
|
||||
fun Project.configureKotlinProjectResources(vararg srcs: String,
|
||||
sourcesBaseDir: File? = null,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectSourceSet(*srcs, sourceSetName = "main", getSources = { this.resources },
|
||||
sourcesBaseDir = sourcesBaseDir, configureSourceDirs = configureSourceDirs)
|
||||
|
||||
fun Project.configureKotlinProjectResources(srcs: Iterable<File>,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectSourceSet(srcs, sourceSetName = "main", getSources = { this.resources }, configureSourceDirs = configureSourceDirs)
|
||||
|
||||
fun Project.configureKotlinProjectResourcesDefault(sourcesBaseDir: File? = null) {
|
||||
configureKotlinProjectResources("resources", sourcesBaseDir = sourcesBaseDir)
|
||||
configureKotlinProjectResources("src", sourcesBaseDir = sourcesBaseDir) { include("META-INF/**", "**/*.properties") }
|
||||
}
|
||||
|
||||
fun Project.configureKotlinProjectNoTests() {
|
||||
configureKotlinProjectSourceSet(sourceSetName = "test", getSources = { this.java })
|
||||
configureKotlinProjectSourceSet(sourceSetName = "test", getSources = { this.resources })
|
||||
}
|
||||
|
||||
fun Project.configureKotlinProjectTests(vararg srcs: String, sourcesBaseDir: File? = null,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectSourceSet(*srcs, sourceSetName = "test", getSources = { this.java },
|
||||
sourcesBaseDir = sourcesBaseDir, configureSourceDirs = configureSourceDirs)
|
||||
|
||||
fun Project.configureKotlinProjectTestsDefault(sourcesBaseDir: File? = null,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectTests("test", "tests", sourcesBaseDir = sourcesBaseDir, configureSourceDirs = configureSourceDirs)
|
||||
|
||||
fun Project.configureKotlinProjectTestResources(vararg srcs: String,
|
||||
sourcesBaseDir: File? = null,
|
||||
configureSourceDirs: SourceDirectorySet.() -> Unit = {}) =
|
||||
configureKotlinProjectSourceSet(*srcs, sourceSetName = "test", getSources = { this.resources },
|
||||
sourcesBaseDir = sourcesBaseDir, configureSourceDirs = configureSourceDirs)
|
||||
|
||||
|
||||
inline fun Project.sourceSets(crossinline body: SourceSetsBuilder.() -> Unit) =
|
||||
SourceSetsBuilder(this).body()
|
||||
|
||||
@@ -88,6 +16,7 @@ class SourceSetsBuilder(val project: Project) {
|
||||
project.configure<JavaPluginConvention>
|
||||
{
|
||||
sourceSets.matching { it.name == sourceSetName }.forEach {
|
||||
none()
|
||||
it.body()
|
||||
}
|
||||
}
|
||||
@@ -95,15 +24,15 @@ class SourceSetsBuilder(val project: Project) {
|
||||
}
|
||||
|
||||
fun SourceSet.none() {
|
||||
java.srcDirs()
|
||||
resources.srcDirs()
|
||||
java.setSrcDirs(emptyList<String>())
|
||||
resources.setSrcDirs(emptyList<String>())
|
||||
}
|
||||
|
||||
fun SourceSet.projectDefault() {
|
||||
when (name) {
|
||||
"main" -> {
|
||||
java.srcDirs("src")
|
||||
resources.srcDir("resources")
|
||||
resources.srcDir("resources").apply { include("**") }
|
||||
resources.srcDir("src").apply { include("META-INF/**", "**/*.properties") }
|
||||
}
|
||||
"test" -> {
|
||||
@@ -112,7 +41,7 @@ fun SourceSet.projectDefault() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: adding dep to the plugin breaks the build unexpectedly, resolve and uncomment
|
||||
// TODO: adding KotlinSourceSet dep to the plugin breaks the build unexpectedly, resolve and uncomment
|
||||
//val SourceSet.kotlin: SourceDirectorySet
|
||||
// get() =
|
||||
// (this as HasConvention)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core"))
|
||||
compile(project(":core::util.runtime"))
|
||||
compile(project(":compiler:util"))
|
||||
@@ -30,6 +29,7 @@ dependencies {
|
||||
compile(preloadedDeps("dx", subdir = "android-5.0/lib"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("tests-common", sourcesBaseDir = File(rootDir, "compiler"))
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
sourceSets {
|
||||
"main" { java.srcDir("../compiler/tests-common") }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
|
||||
apply {
|
||||
plugin("kotlin")
|
||||
}
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
val compileOnly by configurations
|
||||
val testCompile by configurations
|
||||
val testCompileOnly by configurations
|
||||
val testRuntime by configurations
|
||||
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:cli"))
|
||||
compile(project(":compiler.tests-common"))
|
||||
@@ -28,13 +20,11 @@ dependencies {
|
||||
testCompile(ideaSdkDeps("jps-builders"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
|
||||
|
||||
tasks.withType<Test> {
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
systemProperty("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
sourceSets {
|
||||
"main" { java.srcDirs() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
@@ -10,6 +9,10 @@ dependencies {
|
||||
compile(project(":compiler:cli-common"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("backend-common/src", "ir/backend.common/src", sourcesBaseDir = File(rootDir, "compiler"))
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDir("../ir/backend.common/src")
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:backend-common"))
|
||||
compile(project(":compiler:frontend"))
|
||||
@@ -12,7 +11,11 @@ dependencies {
|
||||
compile(project(":compiler:serialization"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("backend/src", "ir/backend.jvm/src", sourcesBaseDir = File(rootDir, "compiler"))
|
||||
configureKotlinProjectResourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDir("../ir/backend.jvm/src")
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,28 +39,25 @@ dependencies {
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSources(
|
||||
"compiler/daemon/src",
|
||||
"compiler/conditional-preprocessor/src",
|
||||
sourcesBaseDir = rootDir)
|
||||
configureKotlinProjectResources("idea/src", sourcesBaseDir = rootDir) {
|
||||
sourceSets {
|
||||
"main" {
|
||||
java.srcDirs("daemon/src",
|
||||
"conditional-preprocessor/src")
|
||||
resources.srcDir("../idea/src").apply {
|
||||
include("META-INF/extensions/common.xml",
|
||||
"META-INF/extensions/kotlin2jvm.xml",
|
||||
"META-INF/extensions/kotlin2js.xml")
|
||||
}
|
||||
configureKotlinProjectTests("tests")
|
||||
}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
dependsOn(":prepare:mock-runtime-for-test:dist")
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
systemProperty("kotlin.test.script.classpath", the<JavaPluginConvention>().sourceSets.getByName("test").output.classesDirs.joinToString(File.pathSeparator))
|
||||
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
|
||||
maxHeapSize = "1200m"
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:cli-common"))
|
||||
compile(project(":compiler:frontend"))
|
||||
@@ -22,11 +21,12 @@ dependencies {
|
||||
compile(files("${System.getProperty("java.home")}/../lib/tools.jar"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("compiler/cli/src",
|
||||
"plugins/annotation-collector/src",
|
||||
"compiler/builtins-serializer/src",
|
||||
"compiler/javac-wrapper/src",
|
||||
sourcesBaseDir = rootDir)
|
||||
configureKotlinProjectResourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDirs("../../plugins/annotation-collector/src",
|
||||
"../builtins-serializer/src",
|
||||
"../javac-wrapper/src")
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core:util.runtime"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
@@ -10,6 +9,8 @@ dependencies {
|
||||
compile(ideaSdkCoreDeps(*(rootProject.extra["ideaCoreSdkJars"] as Array<String>)))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dependencies {
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
runtimeJar {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":kotlin-build-common"))
|
||||
compile(project(":compiler:cli-common"))
|
||||
compile(project(":kotlin-preloader"))
|
||||
@@ -12,6 +11,8 @@ dependencies {
|
||||
compile(project(":compiler:util"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +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
|
||||
compile(project(":core:util.runtime"))
|
||||
compile(commonDep("javax.inject"))
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
@@ -15,17 +10,15 @@ dependencies {
|
||||
testRuntime(ideaSdkCoreDeps("trove4j", "intellij-core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
dependsOn(":prepare:mock-runtime-for-test:dist")
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ dependencies {
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
runtimeJar {
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:cli-common"))
|
||||
compile(ideaSdkCoreDeps(*(rootProject.extra["ideaCoreSdkJars"] as Array<String>)))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectResourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":kotlin-reflect"))
|
||||
compile(preloadedDeps("kotlinx-coroutines-core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:container"))
|
||||
@@ -11,6 +10,8 @@ dependencies {
|
||||
compile(commonDep("io.javaslang","javaslang"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
@@ -14,7 +13,9 @@ dependencies {
|
||||
testCompile(projectTests(":kotlin-build-common"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar()
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:ir.tree"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:backend-common"))
|
||||
compile(project(":compiler:ir.tree"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:backend"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ sourceSets {
|
||||
srcDirs( "src", "instrumentation/src")
|
||||
}
|
||||
}
|
||||
"test" { none() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
runtimeJar {
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
val compileOnly by configurations
|
||||
val testCompile by configurations
|
||||
val testCompileOnly by configurations
|
||||
val testRuntime by configurations
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-junit"))
|
||||
@@ -31,8 +26,10 @@ dependencies {
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jdkHome = rootProject.extra["JDK_18"]!!.toString()
|
||||
@@ -41,16 +38,11 @@ tasks.withType<KotlinCompile> {
|
||||
|
||||
testsJar {}
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
executable = "${rootProject.extra["JDK_18"]!!}/bin/java"
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
dependsOn(":prepare:mock-runtime-for-test:dist")
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
systemProperty("kotlin.test.script.classpath", the<JavaPluginConvention>().sourceSets.getByName("test").output.classesDirs.joinToString(File.pathSeparator))
|
||||
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
|
||||
maxHeapSize = "1200m"
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core"))
|
||||
compile(ideaSdkCoreDeps(*(rootProject.extra["ideaCoreSdkJars"] as Array<String>)))
|
||||
compile(ideaSdkDeps("jps-model.jar", subdir = "jps"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectResources("resources", sourcesBaseDir = rootDir)
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
resources.srcDir(File(rootDir, "resources")).apply { include("**") }
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,14 +12,16 @@ dependencies {
|
||||
compile(commonDep("javax.inject"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources(
|
||||
"descriptor.loader.java/src",
|
||||
sourceSets {
|
||||
"main" {
|
||||
java.srcDirs("descriptor.loader.java/src",
|
||||
"descriptors/src",
|
||||
"descriptors.runtime/src",
|
||||
"deserialization/src")
|
||||
configureKotlinProjectResources(
|
||||
"descriptor.loader.java/src", "deserialization/src") { include("META-INF/**") }
|
||||
configureKotlinProjectNoTests()
|
||||
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" {}
|
||||
}
|
||||
|
||||
|
||||
+8
-13
@@ -1,8 +1,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
val testCompile by configurations
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":kotlin-reflect"))
|
||||
compile(project(":compiler:backend"))
|
||||
@@ -13,15 +11,12 @@ dependencies {
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
|
||||
tasks.withType<Test> {
|
||||
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
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
projectTest {
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
|
||||
apply {
|
||||
plugin("kotlin")
|
||||
}
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
val compileOnly by configurations
|
||||
val testCompile by configurations
|
||||
val testCompileOnly by configurations
|
||||
val testRuntime by configurations
|
||||
compile(project(":core"))
|
||||
compile(project(":idea"))
|
||||
compile(project(":j2k"))
|
||||
@@ -59,13 +52,11 @@ dependencies {
|
||||
testRuntime(ideaPluginDeps("*.jar", plugin = "android"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
|
||||
|
||||
tasks.withType<Test> {
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
systemProperty("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
@@ -258,7 +258,6 @@
|
||||
"configurations": [
|
||||
"apiElements",
|
||||
"archives",
|
||||
"build-version",
|
||||
"compile",
|
||||
"compileClasspath",
|
||||
"compileOnly",
|
||||
@@ -295,7 +294,6 @@
|
||||
"configurations": [
|
||||
"apiElements",
|
||||
"archives",
|
||||
"build-version",
|
||||
"compile",
|
||||
"compileClasspath",
|
||||
"compileOnly",
|
||||
@@ -1941,7 +1939,8 @@
|
||||
"testImplementation",
|
||||
"testRuntime",
|
||||
"testRuntimeClasspath",
|
||||
"testRuntimeOnly"
|
||||
"testRuntimeOnly",
|
||||
"tests-jar"
|
||||
],
|
||||
"extensions": {
|
||||
"ext": "org.gradle.api.plugins.ExtraPropertiesExtension",
|
||||
@@ -2679,7 +2678,6 @@
|
||||
"configurations": [
|
||||
"apiElements",
|
||||
"archives",
|
||||
"build-version",
|
||||
"compile",
|
||||
"compileClasspath",
|
||||
"compileOnly",
|
||||
@@ -2715,7 +2713,6 @@
|
||||
"configurations": [
|
||||
"apiElements",
|
||||
"archives",
|
||||
"build-version",
|
||||
"compile",
|
||||
"compileClasspath",
|
||||
"compileOnly",
|
||||
@@ -3569,7 +3566,6 @@
|
||||
"configurations": [
|
||||
"apiElements",
|
||||
"archives",
|
||||
"build-version",
|
||||
"compile",
|
||||
"compileClasspath",
|
||||
"compileOnly",
|
||||
|
||||
+11
-31
@@ -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",
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDirs("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")
|
||||
}
|
||||
}
|
||||
}
|
||||
configureKotlinProjectTests("tests",
|
||||
"test" {
|
||||
java.srcDirs("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 {}
|
||||
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(ideaSdkDeps("openapi"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
@@ -11,6 +10,8 @@ dependencies {
|
||||
compile(ideaSdkCoreDeps("annotations", "guava", "intellij-core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
val compileOnly by configurations
|
||||
val testCompile by configurations
|
||||
val testCompileOnly by configurations
|
||||
val testRuntime by configurations
|
||||
|
||||
compile(project(":kotlin-reflect"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:light-classes"))
|
||||
@@ -47,14 +42,13 @@ dependencies {
|
||||
testRuntime(ideaPluginDeps("*.jar", plugin = "android"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
compile(ideaPluginDeps("gradle-tooling-api", plugin = "gradle"))
|
||||
compile(ideaPluginDeps("android", "android-common", "sdk-common", plugin = "android"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":core"))
|
||||
compile(project(":compiler:frontend"))
|
||||
@@ -17,13 +16,13 @@ dependencies {
|
||||
compile(ideaSdkDeps("openapi", "idea"))
|
||||
compile(ideaPluginDeps("gradle-tooling-api", "gradle", plugin = "gradle"))
|
||||
compile(preloadedDeps("kotlinx-coroutines-core", "kotlinx-coroutines-jdk8"))
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("idea-core/src", "idea-analysis/src", sourcesBaseDir = File(rootDir, "idea"))
|
||||
configureKotlinProjectResources("idea-analysis/src", sourcesBaseDir = File(rootDir, "idea")) {
|
||||
include("**/*.properties")
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDir("../idea-analysis/src")
|
||||
resources.srcDir("../idea-analysis/src").apply { include("**/*.properties") }
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
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()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.script"))
|
||||
compile(project(":compiler.tests-common"))
|
||||
@@ -12,7 +11,9 @@ dependencies {
|
||||
compile(ideaSdkDeps("openapi", "idea"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,9 +16,10 @@ dependencies {
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
val jar: Jar by tasks
|
||||
|
||||
|
||||
+5
-12
@@ -6,9 +6,6 @@ apply { plugin("kotlin") }
|
||||
//}
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
val testCompile by configurations
|
||||
val testRuntime by configurations
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:frontend.java"))
|
||||
@@ -42,20 +39,16 @@ dependencies {
|
||||
// testRuntime(ideaPluginDeps("*.jar", plugin = "java-i18n"))
|
||||
// testRuntime(ideaPluginDeps("*.jar", plugin = "coverage"))
|
||||
// testRuntime(ideaPluginDeps("*.jar", plugin = "java-decompiler"))
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(ideaSdkCoreDeps("trove4j", "intellij-core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":js:js.ast"))
|
||||
compile(project(":js:js.translator"))
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":js:js.ast"))
|
||||
@@ -11,6 +10,8 @@ dependencies {
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":js:js.ast"))
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
compile(preloadedDeps("json-org"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:serialization"))
|
||||
@@ -10,6 +9,8 @@ dependencies {
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val testCompile by configurations
|
||||
val testCompileOnly by configurations
|
||||
val testRuntime by configurations
|
||||
|
||||
testCompile(project(":compiler.tests-common"))
|
||||
testCompile(project(":compiler:frontend"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
@@ -19,8 +15,10 @@ dependencies {
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
val test: Test by tasks
|
||||
test.apply {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":core"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
@@ -13,6 +12,10 @@ dependencies {
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("js.translator/src", "js.inliner/src", sourcesBaseDir = File(rootDir, "js"))
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDir("../js.inliner/src")
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ description = "Simple Annotation Processor for testing kapt"
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":kotlin-stdlib"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("src/kotlin")
|
||||
configureKotlinProjectResources("src/resources")
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,44 +1,7 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
val compileOnly by configurations
|
||||
val testCompile by configurations
|
||||
val testCompileOnly by configurations
|
||||
val testRuntime by configurations
|
||||
compile(project(":plugins:kapt3"))
|
||||
compileOnly("org.jetbrains.kotlin:gradle-api:1.6")
|
||||
compileOnly("com.android.tools.build:gradle:1.1.0")
|
||||
@@ -46,13 +9,12 @@ dependencies {
|
||||
testCompile(commonDep("junit:junit"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
|
||||
tasks.withType<Test> {
|
||||
workingDir = projectDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = projectDir
|
||||
}
|
||||
|
||||
|
||||
@@ -18,13 +18,7 @@ dependencies {
|
||||
testRuntime("org.apache.maven:maven-core:3.0.3")
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
|
||||
maxHeapSize = "1200m"
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
}
|
||||
projectTest()
|
||||
|
||||
runtimeJar()
|
||||
sourcesJar()
|
||||
|
||||
@@ -15,7 +15,7 @@ dependencies {
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
val jar = runtimeJar {
|
||||
|
||||
@@ -17,8 +17,10 @@ dependencies {
|
||||
}
|
||||
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
val jar: Jar by tasks
|
||||
|
||||
@@ -4,7 +4,6 @@ description = "Kotlin Android Extensions Compiler"
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(ideaSdkCoreDeps("intellij-core"))
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:plugin-api"))
|
||||
@@ -14,16 +13,12 @@ dependencies {
|
||||
compile(ideaPluginDeps("layoutlib", plugin = "android"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("android-extensions-compiler/src", "android-extensions-runtime/src", sourcesBaseDir = File(rootDir, "plugins", "android-extensions"))
|
||||
configureKotlinProjectResourcesDefault(sourcesBaseDir = File(rootDir, "plugins", "android-extensions", "android-extensions-compiler", "src"))
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
java.srcDir("../android-extensions-runtime/src")
|
||||
}
|
||||
"test" { none() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
runtimeJar ()
|
||||
|
||||
@@ -43,17 +43,15 @@ dependencies {
|
||||
testRuntime(ideaPluginDeps("*.jar", plugin = "android"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
val jar: Jar by tasks
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":jps-plugin"))
|
||||
compile(project(":android-extensions-compiler"))
|
||||
compile(ideaPluginDeps("android-jps-plugin", plugin = "android", subdir = "lib/jps"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +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
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":compiler:cli-common"))
|
||||
@@ -17,6 +12,8 @@ dependencies {
|
||||
compileOnly(ideaSdkDeps("openapi", "idea"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +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
|
||||
compile(project(":compiler:util"))
|
||||
compile(project(":compiler:cli"))
|
||||
compile(project(":compiler:backend"))
|
||||
@@ -17,15 +12,14 @@ dependencies {
|
||||
testCompile(commonDep("junit:junit"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ apply {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":compiler:frontend"))
|
||||
compile(project(":idea"))
|
||||
compile(project(":idea:idea-core"))
|
||||
@@ -16,9 +15,13 @@ dependencies {
|
||||
compile(ideaSdkDeps("guava"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources("android-annotations/src",
|
||||
sourceSets {
|
||||
"main" {
|
||||
java.srcDirs("android-annotations/src",
|
||||
"lint-api/src",
|
||||
"lint-checks/src",
|
||||
"lint-idea/src")
|
||||
configureKotlinProjectNoTests()
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ description = "Kotlin NoArg Compiler Plugin"
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compileOnly by configurations
|
||||
val runtime by configurations
|
||||
compileOnly(project(":compiler:frontend"))
|
||||
compileOnly(project(":compiler:frontend.java"))
|
||||
compileOnly(project(":compiler:backend"))
|
||||
@@ -15,8 +13,10 @@ dependencies {
|
||||
runtime(project(":kotlin-stdlib"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
val jar = runtimeJar {
|
||||
from(fileTree("$projectDir/src")) { include("META-INF/**") }
|
||||
|
||||
@@ -20,9 +20,10 @@ dependencies {
|
||||
}
|
||||
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
val jar: Jar by tasks
|
||||
|
||||
|
||||
@@ -2,11 +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
|
||||
testCompile(project(":compiler:util"))
|
||||
testCompile(project(":compiler:backend"))
|
||||
testCompile(project(":compiler:cli"))
|
||||
@@ -35,8 +30,10 @@ dependencies {
|
||||
testRuntime(ideaPluginDeps("*.jar", plugin = "android"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ dependencies {
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { none() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
val jar = runtimeJar {
|
||||
|
||||
@@ -14,8 +14,10 @@ dependencies {
|
||||
compile(project(":idea"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
val jar: Jar by tasks
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
apply { plugin("kotlin") }
|
||||
|
||||
dependencies {
|
||||
val compile by configurations
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":core:util.runtime"))
|
||||
compile(project(":compiler:backend"))
|
||||
@@ -12,6 +11,8 @@ dependencies {
|
||||
buildVersion()
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +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
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":core:util.runtime"))
|
||||
compile(project(":compiler:backend"))
|
||||
@@ -14,7 +9,6 @@ dependencies {
|
||||
compile(project(":compiler:frontend.java"))
|
||||
compile(project(":compiler:light-classes"))
|
||||
compileOnly(ideaSdkDeps("openapi", "idea"))
|
||||
buildVersion()
|
||||
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(project(":compiler.tests-common"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
@@ -25,15 +19,13 @@ dependencies {
|
||||
testRuntime(ideaSdkDeps("*.jar"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSourcesDefault()
|
||||
configureKotlinProjectTestsDefault()
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
@@ -21,8 +21,10 @@ tasks.withType<Jar> {
|
||||
}
|
||||
}
|
||||
|
||||
configureKotlinProjectSources() // no sources
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
val jar: Jar by tasks
|
||||
|
||||
|
||||
@@ -43,19 +43,18 @@ dependencies {
|
||||
testScriptRuntimeJar(project(":kotlin-script-runtime", configuration = "mainJar"))
|
||||
}
|
||||
|
||||
configureKotlinProjectSources() // no sources
|
||||
configureKotlinProjectTests("libraries/tools/kotlin-compiler-client-embeddable-test/src", sourcesBaseDir = rootDir)
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" {
|
||||
// TODO: move closer
|
||||
java.srcDir("../../libraries/tools/kotlin-compiler-client-embeddable-test/src")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
projectTest {
|
||||
dependsOnTaskIfExistsRec("dist", project = rootProject)
|
||||
workingDir = File(rootDir, "libraries/tools/kotlin-compiler-client-embeddable-test/src")
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
systemProperty("kotlin.test.script.classpath", the<JavaPluginConvention>().sourceSets.getByName("test").output.classesDirs.joinToString(File.pathSeparator))
|
||||
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1200m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
|
||||
maxHeapSize = "1200m"
|
||||
ignoreFailures = true
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
systemProperty("compilerJar", testRuntimeCompilerJar.singleFile.canonicalPath)
|
||||
systemProperty("stdlibJar", testStdlibJar.singleFile.canonicalPath)
|
||||
systemProperty("scriptRuntimeJar", testScriptRuntimeJar.singleFile.canonicalPath)
|
||||
@@ -76,73 +75,3 @@ sourcesJar()
|
||||
javadocJar()
|
||||
|
||||
publish()
|
||||
|
||||
// TODO: remove after finalizing publishing (now due to the problems with sam-with-receiver, the code is not fully navigable in the buildSrc)
|
||||
//tasks {
|
||||
// "uploadArchives"(Upload::class) {
|
||||
//
|
||||
// val preparePublication by rootProject.tasks
|
||||
// dependsOn(preparePublication)
|
||||
//
|
||||
// val username: String? by preparePublication.extra
|
||||
// val password: String? by preparePublication.extra
|
||||
//
|
||||
// repositories {
|
||||
// withConvention(MavenRepositoryHandlerConvention::class) {
|
||||
//
|
||||
// mavenDeployer {
|
||||
// withGroovyBuilder {
|
||||
// "repository"("url" to uri(preparePublication.extra["repoUrl"]))
|
||||
//
|
||||
// if (username != null && password != null) {
|
||||
// "authentication"("userName" to username, "password" to password)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pom.project {
|
||||
// withGroovyBuilder {
|
||||
// "licenses" {
|
||||
// "license" {
|
||||
// "name"("The Apache Software License, Version 2.0")
|
||||
// "url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
// "distribution"("repo")
|
||||
// }
|
||||
// }
|
||||
// "name"("${project.group}:${project.name}")
|
||||
// "packaging"("jar")
|
||||
// // optionally artifactId can be defined here
|
||||
// "description"(project.description)
|
||||
// "url"("https://kotlinlang.org/")
|
||||
// "licenses" {
|
||||
// "license" {
|
||||
// "name"("The Apache License, Version 2.0")
|
||||
// "url"("http://www.apache.org/licenses/LICENSE-2.0.txt")
|
||||
// }
|
||||
// }
|
||||
// "scm" {
|
||||
// "url"("https://github.com/JetBrains/kotlin")
|
||||
// "connection"("scm:git:https://github.com/JetBrains/kotlin.git")
|
||||
// "developerConnection"("scm:git:https://github.com/JetBrains/kotlin.git")
|
||||
// }
|
||||
// "developers" {
|
||||
// "developer" {
|
||||
// "name"("Kotlin Team")
|
||||
// "organization"("JetBrains")
|
||||
// "organizationUrl"("https://www.jetbrains.com")
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// pom.whenConfigured {
|
||||
// dependencies.clear()
|
||||
//// dependencies.removeIf {
|
||||
//// withGroovyBuilder {
|
||||
//// "scope"(*emptyArray()) == "test"
|
||||
//// }
|
||||
//// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -15,6 +15,8 @@ tasks.withType<Jar> {
|
||||
from(fileTree("$rootDir/idea/formatter")) { include("src/**") } // Eclipse formatter sources navigation depends on this
|
||||
}
|
||||
|
||||
configureKotlinProjectSources() // no sources
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ tasks.withType<Jar> {
|
||||
from(fileTree("$rootDir/idea/ide-common")) { include("src/**") } // Eclipse formatter sources navigation depends on this
|
||||
}
|
||||
|
||||
configureKotlinProjectSources() // no sources
|
||||
configureKotlinProjectNoTests()
|
||||
sourceSets {
|
||||
"main" {}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ jar.apply {
|
||||
archiveName = "kotlin-mock-runtime-for-test.jar"
|
||||
}
|
||||
|
||||
configure<JavaPluginConvention> {
|
||||
sourceSets["main"].apply {
|
||||
(this as HasConvention).convention.getPlugin<KotlinSourceSet>().kotlin.apply {
|
||||
sourceSets {
|
||||
"main" {
|
||||
java.apply {
|
||||
srcDir(File(rootDir, "core", "runtime.jvm", "src"))
|
||||
.include("kotlin/TypeAliases.kt",
|
||||
"kotlin/text/TypeAliases.kt")
|
||||
@@ -31,9 +31,9 @@ configure<JavaPluginConvention> {
|
||||
"kotlin/internal/Annotations.kt")
|
||||
}
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
|
||||
configureKotlinProjectNoTests()
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
sourceCompatibility = "1.6"
|
||||
|
||||
Reference in New Issue
Block a user