apomelov
11/09/2017, 8:57 AMval run: JavaExec by tasks
run.systemProperties["spring.profiles.active"] = "dev"
Second line is ok, but the first one looks like get any Task from map by name and cast it to JavaExec. Where is my strict typed model?)
Or I want to run coberturaReport prior to test:
val test by tasks
val coberturaReport by tasks
test.dependsOn(coberturaReport)
Ok, no casts but still getting tasks from map by name.Czar
11/09/2017, 9:01 AMtasks.withType<JavaExec> {
systemProperties["spring.profiles.active"] = "dev"
}
apomelov
11/09/2017, 9:12 AMtasks.withType<GenerateReportTask> {
dependsOn(tasks.withType<Test>())
}
?tasks.withType<Test> {
dependsOn(tasks.withType<GenerateReportTask>())
}
The coberturaReport task will cause instrumentation to happen before tests are run, and a coverage report to be generated after tests are run
What does it mean? Should I make test depends on coberturaReport? Or should I just enable somehow it, because there is something to do before tests and something -- after (Or maybe instrumentation will produce all reports). I'm still thinking in terms of maven's lifecycles and it spoils my gradle experience...