Make projectTests type of dependency transitive on testRuntime dependencies
`tests-jar` configuration now extends testRuntime instead of testCompile (note that testRuntime extends testCompile), and projectTests() dependency shortcut makes it transitive. This is required to depend on test utility modules producing `-tests` jar instead of default one without listing all their transitive dependencies.
This commit is contained in:
@@ -37,7 +37,7 @@ fun Project.classesDirsArtifact(): FileCollection {
|
||||
}
|
||||
|
||||
fun Project.testsJar(body: Jar.() -> Unit = {}): Jar {
|
||||
val testsJarCfg = configurations.getOrCreate("tests-jar").extendsFrom(configurations["testCompile"])
|
||||
val testsJarCfg = configurations.getOrCreate("tests-jar").extendsFrom(configurations["testRuntime"])
|
||||
|
||||
return task<Jar>("testsJar") {
|
||||
dependsOn("testClasses")
|
||||
|
||||
@@ -66,7 +66,7 @@ fun Project.ideaUltimatePluginDeps(vararg artifactBaseNames: String, plugin: Str
|
||||
fun Project.kotlinDep(artifactBaseName: String, version: String): String = "org.jetbrains.kotlin:kotlin-$artifactBaseName:$version"
|
||||
|
||||
fun DependencyHandler.projectDist(name: String): Dependency = project(name, configuration = "distJar").apply { isTransitive = false }
|
||||
fun DependencyHandler.projectTests(name: String): Dependency = project(name, configuration = "tests-jar").apply { isTransitive = false }
|
||||
fun DependencyHandler.projectTests(name: String): Dependency = project(name, configuration = "tests-jar")
|
||||
fun DependencyHandler.projectRuntimeJar(name: String): Dependency = project(name, configuration = "runtimeJar")
|
||||
fun DependencyHandler.projectArchives(name: String): Dependency = project(name, configuration = "archives")
|
||||
fun DependencyHandler.projectClasses(name: String): Dependency = project(name, configuration = "classes-dirs")
|
||||
|
||||
@@ -5,7 +5,7 @@ jvmTarget = "1.6"
|
||||
|
||||
dependencies {
|
||||
compile(project(":kotlin-stdlib"))
|
||||
compile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -20,7 +20,6 @@ dependencies {
|
||||
testCompile(projectDist(":kotlin-reflect"))
|
||||
testCompile(projectTests(":compiler"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:tests-common-jvm6"))
|
||||
testRuntime(projectRuntimeJar(":kotlin-preloader"))
|
||||
testRuntime(preloadedDeps("dx", subdir = "android-5.0/lib"))
|
||||
testRuntime(ideaSdkCoreDeps("*.jar"))
|
||||
|
||||
Reference in New Issue
Block a user