Closed demus-nine closed 4 years ago
Thanks, I'll fix it this weekend. I'm thinking of putting the check in the places that uses the config, and putting in defaults, for it the config is not present.
Yeah, that would also be a useful solution. You could also check whether there is a conventions.groovy file, and use the template as the alternative. It is after all a valid groovy file.
Ok, I just pushed a 1.0.4 out give that a try, see if works, and let me know thanks.
Hey @demus-nine I never heard back from you were you able to give version 1.0.4 a try? Did it work?
Well, @demus-nine I'm going to close this ticket for now, because I think I fixed the issue, if not you can reopen it or create a new issue. Thanks.
After installing the plugin, before there is a conventions.grovy file, apply in the plugin crashes on line 90. This prevents running any of the setupEnterpriseGroovy*Conventions tasks to generate the file.
I suggest not enabling the console task until there is a file. See patch:
From 32c773482b7c6a6926eaab7e2f575f66f64d5b0f Mon Sep 17 00:00:00 2001 From: Daniel Demus dde@nine.dk Date: Fri, 8 Nov 2019 16:17:07 +0100 Subject: [PATCH] Only enable the console task if a conventions.groovy file exists
Otherwise it throws a filenotfoundexception, and you don't the setupXxxxConventions tasks are also unavailable.
.../groovy/com/virtualdogbert/EnterpriseGroovyPlugin.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/groovy/com/virtualdogbert/EnterpriseGroovyPlugin.groovy b/src/main/groovy/com/virtualdogbert/EnterpriseGroovyPlugin.groovy index b0a1314..cc3d3a2 100644 --- a/src/main/groovy/com/virtualdogbert/EnterpriseGroovyPlugin.groovy +++ b/src/main/groovy/com/virtualdogbert/EnterpriseGroovyPlugin.groovy @@ -79,7 +79,7 @@ class EnterpriseGroovyPlugin implements Plugin {
project.compileGroovy.groovyOptions.configurationScript = project.file('conventions.groovy')
}
if (!project.hasProperty('console') && project.file('conventions.groovy').exists()) {
-- 2.21.0