Made the task dependency explicit
Avoided String concatenation for referring to root project task.
This way, the code is a bit more safer, more explicit,
will fail early if we mix something up with the tasks.
@@ -49,8 +49,8 @@ public class ContinuousDeliveryPlugin implements Plugin<Project> {
subproject.getPlugins().withType(JavaLibraryPlugin.class, new Action<JavaLibraryPlugin>() {
@Override
public void execute(JavaLibraryPlugin plugin) {
- subproject.getTasks().getByName("publishToMavenLocal")
- .dependsOn(":" + ContributorsPlugin.FETCH_CONTRIBUTORS_TASK);
+ Task fetcher = project.getTasks().getByName(ContributorsPlugin.FETCH_CONTRIBUTORS_TASK);
+ subproject.getTasks().getByName("publishToMavenLocal").dependsOn(fetcher);
}
});
}
