I know that if you write in a view:
<g:javascript src="myscript.js" />
<g:javascript src="myscript.js" />
<g:javascript src="myscript.js" />
<!-- other try -->
<g:javascript library="myscript" />
<g:javascript library="myscript" />
<g:javascript library="myscript" />
It will out output:
<script type="text/javascript" src="/vip/js/myscript.js"></script>
<script type="text/javascript" src="/vip/js/myscript.js"></script>
<script type="text/javascript" src="/vip/js/myscript.js"></script>
<!-- other try -->
<script type="text/javascript" src="/vip/js/myscript.js"></script>
Conclution: with library it will try to include only once.
I have been try to find documentation about it without success.
Do you have any pointer?