Skip to content

Commit

Permalink
Merge pull request #38 from ksa-real/sergeik_gradle6
Browse files Browse the repository at this point in the history
Fix to support gradle 6
  • Loading branch information
dorongold committed Jan 1, 2020
2 parents 9ad8d1d + 983690b commit 340f931
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {
}

group = 'com.dorongold.plugins'
version = '1.4'
version = '1.5'
description = "Gradle plugin that adds a 'taskTree' task that prints task dependency tree"

//Building a text file that contains the classpath of the plugin code. needed for testing on gradle versions prior to 2.5
Expand Down Expand Up @@ -68,4 +68,4 @@ test {
// showStandardStreams = true
exceptionFormat = 'full'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ abstract class TaskTreeTask extends AbstractReportTask {
executionPlan = executionGraph.executionPlan
}
// Getting a private field is possible thanks to groovy not honoring the private modifier
Set entryTasks = executionPlan.entryTasks
Set entryTasks
// Gradle 6+
if (executionPlan.hasProperty('entryNodes')) {
entryTasks = executionPlan.entryNodes
} else {
entryTasks = executionPlan.entryTasks
}
Set tasksOfCurrentProject = entryTasks.findAll { it.getTask().getProject() == project }

// take advantage of gradle's dynamic nature and get the Style enum (which has different FQNs in different gradle versions)
Expand Down

0 comments on commit 340f931

Please sign in to comment.