Robert Jaros
03/10/2020, 5:20 PMtask testJar(type: Jar, dependsOn: testClasses) {
baseName = "${project.archivesBaseName}"
classifier = "tests"
from sourceSets.test.output
}
When I try to just do the same thing I've got an error > SourceSet with name 'test' not found..Ilya Goncharov [JB]
03/10/2020, 5:21 PMmultiplatform plugin, source set’s name is jsTestRobert Jaros
03/10/2020, 5:27 PMjs pluginRobert Jaros
03/10/2020, 5:29 PMRobert Jaros
03/10/2020, 5:29 PMoutputIlya Goncharov [JB]
03/10/2020, 5:32 PMsourceSets.all { } and if it will be fulfilled, closure should be executedRobert Jaros
03/10/2020, 5:36 PMIlya Goncharov [JB]
03/10/2020, 6:51 PMkotlin.sourceSets because we don’t register in common case it in default gradle source sets (because we need complex case with mutiplatform)
KotlinSourceSet doesn’t contain output, because it is only source set (for example in MPP you can have common and js source sets, and definition of output of source set is undefined). We have another abstraction, that contain output, it is compilation, so you can use this
from(kotlin.target.compilations["test"].output.allOutputs)Robert Jaros
03/10/2020, 6:59 PMfrom(tasks["compileTestKotlinJs"].outputs)Robert Jaros
03/10/2020, 6:59 PMIlya Goncharov [JB]
03/11/2020, 10:47 AM