gradle-retrolambda
gradle-retrolambda copied to clipboard
Can't execute 'run' task with retrolambda
I have a root project which uses the application plugin and sub-projects as dependencies. When I try to execute the run task, I got the following error:
09:37:21: Executing external task 'run'...
FAILURE: Build failed with an exception.
- What went wrong: Could not determine the dependencies of task ':run'.
Task with path 'compileRetrolambda' not found in root project 'dte-desktop'.
My plugins block (in root project):
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '1.2.3'
id 'me.tatarka.retrolambda' version '3.2.5'
}
I don't know if it's a bug or an issue on my side, do you have any clue ?
When I look at source code, I can see this :
project.plugins.withType(ApplicationPlugin) {
project.tasks.findByName('run').dependsOn('compileRetrolambda')
}
But I don't see any task with that name. Instead tasks are named from their source sets name. I have a compileRetrolambdaMain task for example. Do you know how to fix this ?
There used to be a "compileRetrolamba" task. It was removed in https://github.com/evant/gradle-retrolambda/commit/99ec75680167dc02782965ce2c81a805d13e3d81#diff-5f7ee02bd827ee69b5f8dc3c5e5ce70f looks like the run task wasn't updated.
I don't think we need a special behavior for the application plugin, it depends on the java plugin.
Probably not any more. Originally the task dependency graph was set up a bit differently making that line required.