Skip to content

Commit 2171a56

Browse files
committed
Support configuration cache + tasks from inlucded builds
Large refactor to support configuration cache. Also include task dependencies form included builds (and thier sub-trees) Bump plugin version to 4.0.0
1 parent 8855339 commit 2171a56

File tree

26 files changed

+837
-516
lines changed

26 files changed

+837
-516
lines changed

CHANGELOG.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,61 @@ Changelog
44
This changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
Version 4.0.0 (2024-06-11)
8+
----------------------------
9+
* Minimum supported Gradle version bumped to 7.6.
10+
* Compatibility with Gradle Configuration Cache.
11+
* Support for tasks from included builds:
12+
* Tasks from included builds (and their task dependency sub-trees) will appear in the task tree, just like tasks from the main build.
13+
* **Note**: Only tasks that are part of the task tree rooted at an entry task will be shown.
14+
Tasks from included builds that Gradle runs automatically before the main task graph is ready (e.g. `:<included project>:compileJava`) will not appear in the task tree.
15+
* The plugin no longer applies itself to all subprojects. Instead, the `taskTree` task is registered in all subprojects. This should slightly reduce this plugin's footprint (performance-wise) in large multi-projects.
16+
17+
718
Version 3.0.0 (2024-03-29)
819
----------------------------
9-
* Add option `--with-description` to print task descriptions
10-
* Omit inputs, outputs and task descriptions for repeated tree nodes
20+
* Add option `--with-description` to print task descriptions.
21+
* Omit inputs, outputs and task descriptions for repeated tree nodes.
1122

1223
Version 2.1.1 (2022-12-31)
1324
----------------------------
14-
* Support Gradle 7.6
25+
* Support Gradle 7.6.
1526

1627
Version 2.1.0 (2021-07-01)
1728
----------------------------
18-
* Use [Task Configuration Avoidance](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html)
29+
* Use [Task Configuration Avoidance](https://docs.gradle.org/current/userguide/task_configuration_avoidance.html).
1930

2031
Version 2.0.1 (2021-07-01)
2132
----------------------------
22-
* Upgrade `org.apache.commons:commons-lang3` due to vulnerability
33+
* Upgrade `org.apache.commons:commons-lang3` due to vulnerability.
2334

2435
Version 2.0 (2021-07-01)
2536
----------------------------
26-
* Support Gradle 6.8 and make it the minimum supported Gradle version
27-
* Add options `--with-inputs` and `--with-outputs` to print task inputs and outputs
28-
* Change option `--task-depth` to `--depth`
37+
* Support Gradle 6.8 and make it the minimum supported Gradle version.
38+
* Add options `--with-inputs` and `--with-outputs` to print task inputs and outputs.
39+
* Change option `--task-depth` to `--depth`.
2940
* Change default behavior to _not_ repeat an already printed sub-tree. Option `--no-repeat` replaced with `--repeat`.
3041

3142
Version 1.5 (2020-01-01)
3243
----------------------------
33-
* Compatibility with gradle 6
44+
* Compatibility with gradle 6.
3445

3546
Version 1.4 (2019-06-01)
3647
----------------------------
3748
* Add `--task-depth` option to limit tree depth.
38-
* Fix bug: `No such property task for class TransformInfo$ChainedTransformInfo`
49+
* Fix bug: `No such property task for class TransformInfo$ChainedTransformInfo`.
3950

4051
Version 1.3.1 (2018-10-08)
4152
----------------------------
4253

43-
* Compatibility with gradle version 5.0-milestone-1
54+
* Compatibility with gradle version 5.0-milestone-1.
4455

4556
Version 1.3 (2017-03-04)
4657
----------------------------
4758

48-
* Compatibility with all gradle versions >= 2.3
49-
* Update gradle wrapper to 3.4
59+
* Compatibility with all gradle versions >= 2.3.
60+
* Update gradle wrapper to 3.4.
5061
* Better multi-project handling:
5162
- Applying the plugin on the root project adds the taskTree task to all child projects.
52-
- Applying the plugin under `allrojects` or `subprojects` exhibits the same behavior (and does not fail anymore due to `task taskTree is already defined`)
63+
- Applying the plugin under `allrojects` or `subprojects` exhibits the same behavior (and does not fail anymore due to `task taskTree is already defined`).
5364

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,12 @@ In a multi-project, it is recommended to apply the plugin on the root project on
130130
I.e. it is unnecessary to apply this plugin under `allprojects` or `subprojects`.
131131

132132
## Version Compatibility
133-
Gradle 6.8+
133+
Gradle 7.6+
134134
Java 1.8+
135135

136136
## Older Version Compatibility
137-
Version 1.5 of this plugin is compatible with Gradle 2.3+
137+
Version 3.0.0 of this plugin is compatible with Gradle 6.8 - 7.5.1
138+
Version 1.5 of this plugin is compatible with Gradle 2.3 - 6.7.1
138139

139140
## IntelliJ Plugin
140141
[reveal-dependency-plugin](https://github.com/jvmlet/reveal-dependency-plugin) can print the task dependency tree inside IntelliJ.

build.gradle

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
1-
apply plugin: 'groovy'
2-
apply plugin: 'java-gradle-plugin'
3-
apply plugin: 'maven-publish'
4-
apply plugin: 'com.gradle.plugin-publish'
5-
6-
buildscript {
7-
repositories {
8-
maven {
9-
url 'https://plugins.gradle.org/m2/'
10-
}
11-
}
12-
dependencies {
13-
classpath 'com.gradle.publish:plugin-publish-plugin:0.21.0'
14-
}
1+
plugins {
2+
id 'com.gradle.plugin-publish' version '1.2.1'
3+
id 'groovy'
154
}
165

176
repositories {
@@ -25,52 +14,45 @@ java {
2514
}
2615

2716
group = 'com.dorongold.plugins'
28-
version = '3.0.0'
17+
version = '4.0.0'
2918
description = "Gradle plugin that adds a 'taskTree' task that prints task dependency tree"
3019

31-
//Building a text file that contains the classpath of the plugin code. needed for testing on gradle versions prior to 2.5
32-
task createClasspathManifest {
33-
def outputDir = file("$buildDir/$name")
34-
35-
inputs.files sourceSets.main.runtimeClasspath
36-
outputs.dir outputDir
37-
38-
doLast {
39-
outputDir.mkdirs()
40-
file("$outputDir/plugin-classpath.txt").text = sourceSets.main.runtimeClasspath.join("\n")
41-
}
42-
}
43-
4420
dependencies {
45-
implementation localGroovy()
46-
implementation 'org.apache.commons:commons-lang3:3.5'
21+
// mandatory dependencies for using Spock
22+
implementation platform('org.codehaus.groovy:groovy-bom:3.0.21')
23+
implementation 'org.codehaus.groovy:groovy'
4724

48-
testImplementation('org.spockframework:spock-core:1.0-groovy-2.4') {
49-
exclude module: 'groovy-all'
25+
implementation 'org.apache.commons:commons-lang3:3.14.0'
26+
27+
testImplementation platform("org.spockframework:spock-bom:2.3-groovy-3.0") {
28+
exclude group: 'org.codehaus.groovy'
5029
}
51-
testImplementation 'com.netflix.nebula:nebula-test:5.0.1'
52-
testImplementation 'commons-io:commons-io:2.5'
53-
testRuntimeOnly files(createClasspathManifest)
30+
testImplementation "org.spockframework:spock-core"
31+
testImplementation "org.spockframework:spock-junit4" // you can remove this if your code does not rely on old JUnit 4 rules
32+
testImplementation 'com.netflix.nebula:nebula-test:10.6.1'
33+
testImplementation 'commons-io:commons-io:2.16.1'
5434
}
5535

56-
pluginBundle {
36+
gradlePlugin {
5737
website = 'https://github.com/dorongold/gradle-task-tree'
5838
vcsUrl = 'https://github.com/dorongold/gradle-task-tree.git'
59-
vcsUrl = 'https://github.com/dorongold/gradle-task-tree.git'
60-
description = "Gradle plugin that adds a 'taskTree' task that prints task dependency tree"
61-
tags = ['task', 'tree', 'dependencies', 'dependency']
6239

6340
plugins {
6441
taskTreePlugin {
6542
id = 'com.dorongold.task-tree'
6643
displayName = 'Gradle Task Tree Plugin'
44+
description = "Gradle plugin that adds a 'taskTree' task that prints task dependency tree"
45+
tags.addAll('task', 'tree', 'dependencies', 'dependency')
46+
implementationClass = 'com.dorongold.gradle.tasktree.TaskTreePlugin'
6747
}
6848
}
6949
}
7050

7151
test {
52+
useJUnitPlatform()
7253
testLogging {
7354
// showStandardStreams = true
55+
events "passed", "skipped", "failed"
7456
exceptionFormat = 'full'
7557
}
7658
}

gradle/wrapper/gradle-wrapper.jar

2.32 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)