Skip to content

Commit 4e2d61b

Browse files
committed
Short circuit weaving task if there's nothing to weave.
1 parent ba88a05 commit 4e2d61b

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can add this plugin to your project by adding it to your plugins block:
99

1010
```groovy
1111
plugins {
12-
id "services.bst.weave-dependencies" version "0.1.0"
12+
id "services.bst.weave-dependencies" version "0.1.2"
1313
}
1414
```
1515

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gradlePlugin {
1717
displayName = 'AspectJ dependency weaving plugin'
1818
description = 'For weaving binary aspects into binary dependencies'
1919
implementationClass = 'services.bst.gradle.WeaveDependenciesPlugin'
20-
version = '0.1.1'
20+
version = '0.1.2'
2121
}
2222
}
2323
}

src/main/groovy/services/bst/gradle/WeaveDependenciesTask.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ class WeaveDependenciesTask extends DefaultTask
6262

6363
@TaskAction
6464
def weave() {
65+
// Don't do anything if there's nothing to weave.
66+
if (dependenciesToWeave.isEmpty()) {
67+
return
68+
}
69+
6570
// Clear the output directory.
6671
new File(outDir).traverse {
6772
it.delete()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
implementation-class=services.bst.gradle.WeaveDependenciesPlugin
2+

0 commit comments

Comments
 (0)