Build: Specify LIBRARY_ELEMENTS_ATTRIBUTE to JAR for configurations with js libraries
This commit is contained in:
@@ -16,7 +16,11 @@ node {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val antLauncherJar by configurations.creating
|
val antLauncherJar by configurations.creating
|
||||||
val testJsRuntime by configurations.creating
|
val testJsRuntime by configurations.creating {
|
||||||
|
attributes {
|
||||||
|
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testRuntime(intellijDep())
|
testRuntime(intellijDep())
|
||||||
|
|||||||
@@ -6,6 +6,15 @@ description = 'Kotlin-test integration tests for JS'
|
|||||||
|
|
||||||
apply plugin: 'kotlin-platform-js'
|
apply plugin: 'kotlin-platform-js'
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
nodeModules {
|
||||||
|
extendsFrom testCompile
|
||||||
|
attributes {
|
||||||
|
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements, LibraryElements.JAR))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':kotlin-test:kotlin-test-js')
|
compile project(':kotlin-test:kotlin-test-js')
|
||||||
}
|
}
|
||||||
@@ -19,9 +28,10 @@ buildDir = "$projectDir/build"
|
|||||||
|
|
||||||
task populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) {
|
task populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) {
|
||||||
from compileKotlin2Js.destinationDir
|
from compileKotlin2Js.destinationDir
|
||||||
|
dependsOn(configurations.nodeModules)
|
||||||
|
|
||||||
from {
|
from {
|
||||||
configurations.testCompile.collect {
|
configurations.nodeModules.collect {
|
||||||
zipTree(it.absolutePath).matching { include '*.js' }
|
zipTree(it.absolutePath).matching { include '*.js' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ val proguardLibraries by configurations.creating {
|
|||||||
// Libraries to copy to the lib directory
|
// Libraries to copy to the lib directory
|
||||||
val libraries by configurations.creating {
|
val libraries by configurations.creating {
|
||||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
||||||
|
attributes {
|
||||||
|
attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(LibraryElements.JAR))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compiler plugins should be copied without `kotlin-` prefix
|
// Compiler plugins should be copied without `kotlin-` prefix
|
||||||
|
|||||||
Reference in New Issue
Block a user