You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was investigating this problem which was encountered by setting the plugin on a Gradle project. I noticed that the problem occurs as FileTemplateLoader in FreeMarkerTemplatesRegistry is being initialised to the current working directory which in the case of Gradle will be the daemon folder.
FileTemplateLoader fileTemplateLoader = new FileTemplateLoader(new File("."));
The solution I was considering to address this problem was to include support for a new configuration customTemplatesDirectory or customTemplatesRoot. This will provide the developer with the ability to configure the template directory for a project. Since the configuration will be available from each of the build plugins the default value for the template's root will be defined by each plugin whereas for Gradle this can be the project's root directory. Such a configuration would then need to be provided to the FileTemplateLoader.
…latesRoot" #1158 (#1198)
* added support for specifying the template source for custom templates
* formatted test sources
* resolved issues with sbt plugin
* formatted source class according to checkstyle rules
* updated scala plugin to resolve to the working directory
---------
Co-authored-by: Isaac Mercieca <[email protected]>
Issue Description
The custom template don't work properly with the Gradle Plugin since the daemon folder is used as root instead of the project folder.
Steps to Reproduce
Try to configure a custom template using the gradle plugin.
The root folder is going to be the gradle daemon root.
Expected Result
It should use the project folder as the root.
Actual Result
It uses the daemon root.
Your Environment and Setup
The text was updated successfully, but these errors were encountered: