Leandro Ocampo
10/14/2020, 5:05 PMtasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
compileTask -> compileTask.dependsOn ":custom-create-plugin:createNewPlugin"
}
What I need is to make this compileTask to depend on this task only for release builds. Any ideas?
I already tried something like this with success:
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Release")){
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
compileTask -> compileTask.dependsOn ":custom-create-plugin:createNewPlugin"
}
}
But I am wondering if there is a better way or this is good enough?