Build: Use attributes to resolve test dependencies in jps build mode
This commit is contained in:
@@ -4,7 +4,13 @@ plugins {
|
||||
}
|
||||
|
||||
val compile by configurations
|
||||
val fatJarContents by configurations.creating
|
||||
val fatJarContents by configurations.creating {
|
||||
isCanBeResolved = true
|
||||
isCanBeConsumed = false
|
||||
attributes {
|
||||
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR))
|
||||
}
|
||||
}
|
||||
val fatJarContentsStripMetadata by configurations.creating
|
||||
val fatJarContentsStripServices by configurations.creating
|
||||
|
||||
|
||||
@@ -2,10 +2,22 @@ plugins {
|
||||
base
|
||||
}
|
||||
|
||||
val sources by configurations.creating
|
||||
val sources by configurations.creating {
|
||||
attributes {
|
||||
isCanBeResolved = true
|
||||
isCanBeConsumed = false
|
||||
attributes {
|
||||
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR))
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations["embeddedElements"].isCanBeConsumed = false
|
||||
|
||||
dependencies {
|
||||
sources(project(":kotlin-stdlib-common", configuration = "sources"))
|
||||
sources(project(":kotlin-stdlib-common"))
|
||||
}
|
||||
|
||||
val buildSources by tasks.registering(Jar::class) {
|
||||
|
||||
Reference in New Issue
Block a user