Applied the plugin instead of getting extension
This way the implementation is more robust,
we don't have to rely that somebody else already created the extension.
We actively apply the plugin that adds the extension.
@@ -227,7 +227,7 @@ public class ContinuousDeliveryPlugin implements Plugin<Project> {
lazyConfiguration(t, new Runnable() {
public void run() {
- String branch = project.getExtensions().getByType(GitStatusPlugin.GitStatus.class).getBranch();
+ String branch = project.getPlugins().apply(GitStatusPlugin.class).getGitStatus().getBranch();
t.setBranch(branch);
}
});
