I am working on a old project made on Grails 2.5.1 and I came across the file 'ApplicationResources.groovy'.
Contents of the file were as below -
module1 {
dependsOn "chosen","datePicker"
}
module2 {
dependsOn "maskedInput", "timePicker"
resource url: "js/fullCalendarNew/lib/main.css"
resource url: "js/fullcalendar/fullcalendar.print.css", attrs: [ media: 'print' ]
resource url: "js/fullCalendarNew/lib/main.js", disposition:'head', nominify: true
resource url: "js/custom_calendar.js"
resource url: "css/calendar_popup_form.css"
resource url: "js/jquery.bpopup-0.7.0.min.js"
resource url: "js/fullcalendar/jquery.qtip-1.0.0-rc3.js"
}
It seems like files consists of dependencies of various modules, but how does it work, what's the syntax to define such dependencies ? I couldn't find any documentation either on Grails official website.
This is the way to declare static resources. grails resources plugin provides this functionality.
This is the documentation of the plugin. Have a look at resource declaration.