Skip to content

Commit

Permalink
Check entire project tree during dependency adjustment.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Oct 6, 2020
1 parent 6a16a9e commit 0a8b2a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,13 @@ public void execute(Project project) {
byteBuddyTask.dependsOn(compileTask);
extension.configure(byteBuddyTask);
configureDirectories(sourceSet.getJava(), compileTask, byteBuddyTask);
for (Map.Entry<Project, Set<Task>> entry : project.getAllTasks(true).entrySet()) {
for (Map.Entry<Project, Set<Task>> entry : project.getRootProject().getAllTasks(true).entrySet()) {
for (Task task : entry.getValue()) {
if (!task.getName().equals(name) && task.getDependsOn().contains(compileTask.getName())) {
if (!(task.getName().equals(name)
&& task.getProject().equals(project))
&& task.getTaskDependencies().getDependencies(task).contains(compileTask)) {
task.dependsOn(byteBuddyTask);
project.getLogger().warn("Altered task '{}' of project '{}' to depend on '{}' of project '{}'",
project.getLogger().debug("Altered task '{}' of project '{}' to depend on '{}' of project '{}'",
task.getName(),
entry.getKey().getName(),
name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ protected void configureDirectories(SourceDirectorySet source, JavaCompile compi
}
}


/**
* Transforms a directory to a file.
*/
Expand Down

0 comments on commit 0a8b2a6

Please sign in to comment.