Karlo Lozovina
02/25/2021, 8:34 PMsourceSets {
main {
java.srcDir("main")
}
test {
java.srcDir("test")
}
create("jmh") {
java.srcDir("jmh")
}
}
and the problem is that inside the "jmh" sourceSet I can't import my main classes...Big Chungus
02/25/2021, 8:42 PMBig Chungus
02/25/2021, 8:43 PMKarlo Lozovina
02/25/2021, 8:47 PMKarlo Lozovina
02/25/2021, 8:50 PMimplementation("foo.bar:mproject:0.0.0")
, but then I have to repeat all the dependencies... maybe better to depend on the main sourceSetKarlo Lozovina
02/25/2021, 8:52 PMBig Chungus
02/25/2021, 9:07 PMKarlo Lozovina
02/25/2021, 9:11 PMkotlin {
sourceSets.named("jmh") {
dependsOn("main")
}
}
because dependsOn() doesn't take String as argument, it takes a KotlinSourceSetKarlo Lozovina
02/25/2021, 9:12 PMKarlo Lozovina
02/25/2021, 9:14 PMdependsOn(sourceSets.named("main"))
Big Chungus
02/25/2021, 9:15 PMKarlo Lozovina
02/25/2021, 9:22 PMkotlin {
sourceSets.named("jmh") {
dependsOn(sourceSets.findByName("main")!!)
}
}
doesn't work, running the benchmarks fails with:
Project#afterEvaluate(Action) on root project 'myproject' cannot be executed in the current context.
Karlo Lozovina
02/25/2021, 9:23 PMKarlo Lozovina
02/25/2021, 9:23 PMKarlo Lozovina
02/25/2021, 9:28 PM